[Catalyst] RFC: file/path writing sub-class
of Catalyst::Plugin::Static::Simple
Ash Berlin
ash at cpan.org
Sun Nov 26 22:01:07 GMT 2006
apv wrote:
> I'm probably about to write a sub-class of
> Catalyst::Plugin::Static::Simple which writes the file to disk on the
> first request. The reason is I like to have all my extra static files
> (images, media, css, etc) in the same bundle as the application but I
> also want to let Apache serve them, obviously. So I can either try to
> keep a tree sync'd between my app path and my webserver path or do this
> so the authoritative versions in the app path are written to disk on
> first request. (Semi-)Permanent cache.
>
> Do you think this is something useful enough to also put on the CPAN?
> Other feedback?
>
> Name? Catalyst::Plugin::Static::DiskWrite? The idea is not to be able to
> check for freshness or other cache-like behavior but to write it if it's
> not there and leave it at that. Used with things like:
>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*) /index.fcgi/$1 [QSA,L]
>
>
Can you not just do:
Alias /static /path/to/my/app/static
In your Apache (or whatever) config?
More information about the Catalyst
mailing list