shannah / swete

Web Internationalization Proxy
GNU General Public License v3.0
13 stars 7 forks source link

Add CONSERVATIVE_CACHE flag #4

Closed shannah closed 11 years ago

shannah commented 11 years ago

By default the live cache will cache everything that doesn't explicitly say not to cache it. The NOSERVERCACHE flag can be used to disable server caching altogether, but this may be missing out on opportunities to still cache pages that explicitly want to be cached.

We should add a CONSERVATIVE_CACHE flag that will cause the cache to only operate when the response headers EXPLICITLY say that the page should be cached.

shannah commented 11 years ago

Fixed. This is now the default behaviour. Currently it can only be disabled by changing the default value of LiveCache in the class definition. Perhaps at a later date we'll allow environment variables to override this.