On Sep 5, 2008, at 1:31 PM, Sandeep Ghael wrote:
> I have been playing with the proxy cache capabilities in Resin 3.1.6
> pro lately. By the description, proxy cache seem incredibly powerful,
> but I have confusion implementing the proxy cache in certain cases.
> The one that does not work:
> So I decided to try the same trick on an rss feed I create via an php
> script. The goal here would be turning a dynamic feed into basically
> a static feed, and avoiding making multiple database calls for the
> instances where the rss page was returned from a cache hit. I added
> the same Expire headers to the rss.php script, and added a similar
> cache-mapping parameter in the resin.conf file:
> <cache-mapping url-pattern="*rss.php*"
> However, this time resin does not log that the rss.php url is getting
> cached. I'm at a loss for why the proxy cache would work in the
> albumArt.php case, but not the rss.php case. Any ideas?
The <cache-mapping> only applies to cacheable pages. In other words,
the page must either have an ETag (preferred) or Last-Modified-Time
(deprecated), before cache-mapping will be applied.
The idea of cache-mapping is to allow configuration for things like
static files, but it's not intended to automatically make pages
Also, the <cache-mapping> will not override an Expires or max-age
that's set by the application because it essentially fills in defaults.
(Also, you should use "Cache-Control: max-age=100" instead of Expires.)
> resin-interest mailing list
resin-interest mailing list