phly / PhlySimplePage

ZF2 module for easily creating static pages
Other
35 stars 12 forks source link

Caching should consider "Expires" headers #1

Open Ocramius opened 11 years ago

Ocramius commented 11 years ago

Currently, the module doesn't consider the expire header of produced output.

I personally think it should cache only on absent header or on positive life time for the response, and TTL of the cache item should be adjusted accordingly.

nhaze commented 11 years ago

I have zfcuser installed and if a user visits a phlysimplepage and logs out when the user visits the same page their credentials are still cached for that page. I know i can adjust this by not caching it but it would be nice to only cache the page and not the layout

weierophinney commented 11 years ago

@nhaze The simple answer is: don't cache pages that have authentication. The longer answer is: create a listener that checks authentication before serving such pages and serves up a 401; the listener would need to listen at higher priority than the cache listener on the route event.

On Wed, Dec 26, 2012 at 7:44 AM, nhaze notifications@github.com wrote:

I have zfcuser installed and if a user visits a phlysimplepage and logs out when the user visits the same page their credentials are still cached for that page.

— Reply to this email directly or view it on GitHubhttps://github.com/weierophinney/PhlySimplePage/issues/1#issuecomment-11686586.

Matthew Weier O'Phinney matthew@weierophinney.net http://mwop.net/