https://github.com/jpdevries/cachebuster
MODX Cachebuster Extra Repository
https://github.com/jpdevries/cachebuster
Last synced: 5 months ago
JSON representation
MODX Cachebuster Extra Repository
- Host: GitHub
- URL: https://github.com/jpdevries/cachebuster
- Owner: jpdevries
- Created: 2013-03-03T06:02:27.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-03T07:17:30.000Z (about 13 years ago)
- Last Synced: 2025-02-15T03:41:14.232Z (about 1 year ago)
- Language: PHP
- Size: 410 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is the README file for the Extra described at:
[Cachebuster Extra](http://modx.com/extras/package/cachebuster)
A simple plugin that is handy for ensuring assets load fresh by generating a truly unique number.
Now use cachebuster to set an optional placeholder to be used for consecutive cache-busting!
[[$smartcache? &m=`cb=` &placeholder=`cbtime`]] will output something like cb=1362093673.
You'll then have a [[+cbtime]] placeholer to use in any of your Templates with the value of 1362093673.
Examples:
Let's say we always want a particular JavaScript file or AJAX request to load from the server. Just call the smartcache Chunk. If the Cache Bust System Setting is true, a truely unique string will be returned. Otherwise, your site version will be returned for cache control (ex 0.1)
Thanks for using cachebuster!
JP DeVries
mail@devries.jp