unikent/programmes-plant — pull request #246 by conatus (2013-02-14 16:40:16+00:00)
Title: Correct Cache Expiry

After ten minutes Of Course will revalidate - if the data has not changed a 304 will be served and the data should come from the cache. Before Of Course always served from cache until the default expiry for the cache set by Guzzle. Explicitly setting this means that updates should be pulled from the Programmes Plant to Of Course within a ten minute window (partially for load, partially for safety).

See https://github.com/unikent/programmes-plant-api-php/pull/8

See https://github.com/unikent/programmes-plant-api-php/blob/feature/ensure-caching-policy-is-correct/tests/ProgrammesPlant.test.php#L474-L640 which simulates this process in tests.