[Catalyst] Caching problem?

Brandon Black blblack at gmail.com
Thu Jan 12 22:24:07 CET 2006


On 1/12/06, Wade.Stuart at fallon.com <Wade.Stuart at fallon.com> wrote:
> Well I think it is very useful (I use some form of it on almost every app I
> make),  but the issue is it is almost _never_ useful to set the default on
> all pages served.  There needs to be simple logic allowed such as
> "if not /^static/"...  I think we will be in a worse place if we hand out a
> "turn all caching off" flag to people.  They need to be able to understand
> what portions of their app it makes sense for and what ones it does not.
>

Agreed.  But the plugin doesn't force all Responses to be no-cached. 
It simply provides a convenience method $c->res->no_cache for you to
use anytime you don't want a particular response to be cached, which
wraps all the magic HTTP headers.  If you don't call the method, the
output is still cacheable.

It's still up to the app dev to use or not use that method in any
given controller (or in my particular case, I stuff it in the root
auto method because all of my controllers output uncacheable data, the
only static stuff is sent by Static::Simple, which doesn't use the
root auto method).

-- Brandon



More information about the Catalyst mailing list