Repeated 'cycling' between healthy and unhealthy eating is increasingly common but the effects of such cycling on cognitive function are unknown. Here we tested the effects of cycling between chow and a cafeteria diet (CAF) rich in saturated fat and refined carbohydrates on fat mass and place recognition memory in rats. Rats fed the chow diet (control group) were compared with groups fed CAF for either: 3 consecutive days per week followed by 4 days of chow, (3CAF:4CHOW group); 5 consecutive days per week followed by 2 days of chow (5CAF:2CHOW group); or 7 days per week (7CAF group). Total days of exposure to CAF were matched between the latter groups by staggering the introduction of CAF diet. After 16-18 days of CAF, spatial recognition memory was significantly worse in the 7CAF group relative to controls. After 23-25 days of CAF, both the 7CAF and 5CAF:2CHOW groups, but not the 3CAF:4CHOW group, were impaired relative to controls, mirroring changes in fat mass measured by EchoMRI. CAF feeding did not affect object recognition memory or total exploration time. These results indicate that even when matching total exposure, the pattern of access to unhealthy diets impairs spatial memory in a graded fashion.