[Catalyst] Cache of unchanging content

will trillich will.trillich at serensoft.com
Tue Mar 1 14:35:19 GMT 2011


Also see
http://wiki.catalystframework.org/wiki/adventcalendararticles/2007/11-Makin=
g_your_Catalyst_App_Cache-friendly
for
a neat approach to setting browser-cache expiry info.


On Tue, Mar 1, 2011 at 5:49 AM, John M. Dlugosz <wxju46gefd at snkmail.com>wro=
te:

>  That's only part of it.  It should also answer status 304, and set heade=
rs
> to tell the client not to even bother asking again any time soon.
>
>
> On 3/1/2011 4:45 AM, Jorge Gonzalez jorge.gonzalez-at-daikon.es|Catalyst/=
Allow to home| wrote:
>
> So what you need then is a templating system which caches the generated c=
ontent
> from the templates and then when asked for it again later, it checks if t=
he
> template has been changed, and if it hasn't (so the content generated wil=
l be
> the same if executed), answer the browser with a "Content not changed" in=
stead
> of sending the content.
>
> Looks like you might need Template::Plugin::Cache:
> http://search.cpan.org/~perrin/Template-Plugin-Cache-0.13/Cache.pm
> <http://search.cpan.org/%7Eperrin/Template-Plugin-Cache-0.13/Cache.pm> <h=
ttp://search.cpan.org/%7Eperrin/Template-Plugin-Cache-0.13/Cache.pm>
>
>
> Specially interesting the "Any gotchas..." section of the docs :-)
>
> Regards
> J.
>
>
> 	*/Jorge Gonz=E1lez Villalonga/*
> Director T=E9cnico
>
> */DAIKON Integraci=F3n y Desarrollo S.L./*
> Telf: (+34) 91 188 08 28
> Fax: (+34) 91 632 65 42
> *www.daikon.es*
>
>
> El 01/03/11 10:23, John M. Dlugosz escribi=F3:
> >  Say I want to use TT in the .css, so (for example) I can name my color=
s and
> > other repeated content easily.
> >
> > I'm assuming that I can define a Path of some kind on a rule to serve t=
hose.
> > Any recipes to share?
> > More critically, I want the browser to know that it doesn't have to keep
> > re-fetching it on every view of every page.  How would I manage that?
> >
> > _______________________________________________
> > List: Catalyst at lists.scsys.co.uk
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co=
.uk/
> > Dev site: http://dev.catalyst.perl.org/
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
>
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.u=
k/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>


-- =

The first step towards getting somewhere is to decide that you are not going
to stay where you are.  -- J.P.Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110301/d43ba=
a20/attachment.htm


More information about the Catalyst mailing list