Plugin

EE 1
EE 2
Cache Buster

Developer

Focus Lab, LLC - Erik Reagan

3rd Party (Free)

Creative Commons Attribution Non-Commercial No Derivatives Download v1.1.0

Compatibility

  • LG Addon Updater
  • Multi Site Manager
  • Stand Alone Entry Form

Requirements

  • jQuery for the Control Panel

Tags

Using ExpressionEngine’s CSS template provides a nice cache buster string of the most recent time the template was saved to the database. This is quite handy but still requires EE to process the template. This plugin will take a file path and use PHP to check the modification time returning a cache busting string like ExpressionEngine’s. This allows you to serve flat files from your server without having ExpressionEngine’s template parser run through the code first. It is very simple to use.

Usage

There are 2 parameters. One is required and the other is optional.

{exp:cache_buster file="/css/style.css"}

This will return

/css/style.css?v=1266264101

Where “1266264101” is the UNIX timestamp of the last time /css/style.css was saved to the server.

You can change the separator between the file and the timestamp with the use of separator=”” in the tag.

{exp:cache_buster file="/css/style.css" separator="?"}

This will return

/css/style.css?1266264101

Download Cache Buster

EE Version Downloads Add-On Version Release Date
1.x Download 1.1.0 2010-03-27 12:00 AM
2.+ Download 1.1.0 2010-03-27 12:00 AM

Cache Buster Links

This entry was last updated May 12, 2010, 10:39 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. Devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

2 Reviews:

Jannis Gundermann 08.23.11

Rating - {addon_rating_average}

This plugin works great, I can highly recommend it.

It should also be noted that this will also work with your JavaScript files not just CSS files.

Doug Avery 01.27.11

Rating - {addon_rating_average}

Great implementation of a great idea. A++++ would download again!