[Catalyst] RFC: file/path writing sub-class of Catalyst::Plugin::Static::Simple

Jonathan Rockway jon at jrock.us
Mon Nov 27 16:26:43 GMT 2006


Kieren Diment wrote:
> [snipped prior correspondence]
> 
> I'm not sure, because systems architecture is really not my thing, but
> this sounds like something you might describe as
> Catalyst::Plugin::Cache::Static - which would render a template  into a
> variable and serve off an appropriate path for the webserver to deal
> with.  Kind of like PageCache, but designed to totally bypass catalyst
> for read-only docs.

This is exactly what Apache's mod_cache does.  It fetches the page once
(from Catalyst), and then stores it until it expires (set in the
headers).  The caching is URL based, but by cleverly applying
mod_rewrite you can have it account for cookies, etc.

Docs are here:

http://httpd.apache.org/docs/2.2/mod/mod_cache.html

Maybe this would be a good advent calendar topic?

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;



More information about the Catalyst mailing list