Tired of explaning to clients and PM's that they'll need to force refresh to see your latest changes? Let cmdR take care of it for you!
cmdR appends a query string using the last modified timestamp of your asset. The next time your asset gets modified, the query string will update and you'll have busted that cache!
To install cmdR, follow these steps:
- Download & unzip the file and place the
cmdr
directory into yourcraft/plugins
directory - -OR- do a
git clone https://github.com/ten4design/cmdr.git
directly into yourcraft/plugins
folder. You can then update it withgit pull
- Install plugin in the Craft Control Panel under Settings > Plugins
- The plugin folder should be named
cmdr
for Craft to see it.
cmdR works on Craft 2.6.2954
Install the plugin and replace any asset URLs you'd like to be cache busted with
{{ cmdR( 'fileUrl' ) }}
fileUrl
is relative from the web root. e.g. {{ cmdR( 'assets/css/main.css' ) }}
- Initial release
Brought to you by Luke Pearce