ZF-3078: Handling Cache-Control proxy behaviour

Description

It would seem to me that having to specify rules for caching based on regular expressions of the uri is a bit redundant when there is a ruleset in place by the HTTP specification that should determine if a page should be cached or not.

With changing the HTTP Cache-Control headers, you can tell any cache whether to store/cache private/shared. i.e. private, no-cache, no-store.

Could the Zend_Cache_Frontend_Page include a feature that performs this behaviour?

In the simplist terms, the class should not cache if any of the three flags are present in the Cache_Control header.

This should mostly remove the need to specify before-hand any rules, and allow the cache of a page based to be controlled by the page code itself.

For instance, if I don't start the cookie sessions, the page gets cached. If I do, those flags are set automatically as the page may be dynamically driven by user state, so the page is not cached. The default active session behaviour of not caching may not be what the developer had in mind, but it is that which should be tweaked, as the website performance would improve as any proxies along the way would also cache the content, if the site was to perform client caching behaviours as well (e.g. HTTP status 304).

Comments

Please evaluate and categorize/assign as necessary.

seems to be a really good idea

change Assignee because I'm inactive now

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.