On Thursday 20 September 2007 12:10 am, Philippe M. Chiasson wrote: > Graham TerMarsch wrote: > > I've been working on some projects needing JS minification recently and > > wanted to ping others and find out if anyone else would find it useful to > > have a mod_perl2 filter that auto-minified your JS (using > > JavaScript::Minifier)... > > > > Am thinking along the lines of something that you'd set up in your Apache > > config like: > > > > <FilesMatch "\.js$"> > > PerlOutputFilterHandler Apache2::Filter::Minifier::JavaScript > > PerlSetVar MINIFIER_CACHE_ROOT /path/to/your/cache/dir > > </FilesMatch> > > > > Results would be cached to disk, so that we didn't have to re-minify the > > JS files on each and every request. Obviously, if the original file > > changes, the cached copy would be considered invalid. > > Sounds like an interesting module, and I certainly would use it to serve > my JavaScript. One note however, why implement your own caching mechanisms > when you could very simply just make use of the existing mod_cache > framework ?
Oh right... mod_cache... forgot about that... Anyone care to pipe in with a quick snippet of config that I could include in the docs? (its late/early and I'm not thinking clearly enough yet myself) -- Graham TerMarsch