unikent/programmes-plant-api-php — pull request #8 by conatus (2013-02-14 16:19:49+00:00)
Title: Ensure Caching Policy Is Correct

This ensures that the correct caching policy is set and tests other things here including exceptions are properly tested.

- Cache serves on a 500 error from the server.
- Cache serves from when the current header is received from the Programmes Plant (Cache-Control: public)
- Cache does not serve when the max-age of Cache-Control has expired (new Programmes Plant setting is for ten minutes) - cache revalidates itself - getting new data as needed.
- In the scenario where the Cache-Control has expired a HTTP request is sent to revalidate itself - if it receives a 304 then cache is served.

These tests require Node.js to be installed to run as the leverage the Guzzle Node.js micro-server to queue HTTP responses which the library then consumes.