Persistent cache plugin for KISSCMS, using a dedicated SQLite database.
Use this when you need caching that spans accross users and possibly extends beyond session persistance...
Download and place the archive in your plugins folder
A sample usage of the class. You should only need to initiate the class once per run...
$cache = new Cache();
// add an item
$key = "mykey";
$value = "a value can be a string or array";
$cache->setItem( $key, $value );
// get item
$cache->getItem( $key );
When initiating the class you can pass an array of options. Thhose are:
- timeout - set the time difference where the contents of the cache gets invalidated. Set in milliseconds. Default: 10000 (10 seconds).
The interface has been modelled after regular Web Storage APIs (localStorage, sessionStorage)
Saved a single key-values to the database.
Retrieves an item with the specific key. Returns null if nothing found.
Removes the entry with the specific key.
A few of the sites using this open source:
##Credits
Initiated by Makis Tracend ( @tracend )
Distributed through Makesites.org
Released under the MIT license