I have an external Apache filter, which obfuscates JS file before output.
Working configuration looks like:
ExtFilterDefine js-obfuscate cmd="/usr/bin/yui-compressor --type=js" <Directory /var/www/oberwald> ExtFilterOptions DebugLevel=3 LogStderr Onfail=remove AddOutputFilter js-obfuscate js </Directory>
It takes time to obfuscate the code, thus it's not good for production use.
How can I use mod_mem_cache to filter content only when it is changed?
Perfect workflow would be:
- mod_cache determines Last-Modified and serve cached (obfuscated) content, or:
- Pass the file through filter, cache result and return output