That darned cache!

in

CSS caching - can't live without it (else your site surely will die on IE), but what a pain for development. Like many of us, I do development on a local LAMP stack, and use Subversion to send work up to the remote production server. And I'm constantly pulling the remote database down for refreshing my local, and along with it inheriting the cache settings. What to do?

Well yeah, I could go into preferences and turn them off each time I sync up, but it's easy to forget. Plus, I subscribe to Larry Wall's theory that laziness is a desirable attribute in a programmer. So here's a little trick my dev team buddy Brian Tully taguht me - go into the settings.php file for your local host setup, and add these lines to the $conf array:

// enable/disable CSS aggregation (1 to enable, 0 to disable)
'preprocess_css' => 0,
// enable/disable JS aggregation and optimization (1 to enable, 0 to disable)
'javascript_aggregator_aggregate_js' => 0,
'javascript_aggregator_optimize_js' => 0,

This also disable javascript aggregation. Ah, much better!