|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($memcache, $expire=0) | |
| store ($id, $data) | |
| getSize ($id) | |
| isValid ($id, $srcMtime) | |
| display ($id) | |
| fetch ($id) | |
Memcache-based cache class for Minify
// fall back to disk caching if memcache can't connect $memcache = new Memcache; if ($memcache->connect('localhost', 11211)) { Minify::setCache(new Minify_Cache_Memcache($memcache)); } else { Minify::setCache(); }
Definition at line 20 of file Memcache.php.
| __construct | ( | $ | memcache, |
| $ | expire = 0 |
||
| ) |
Create a Minify_Cache_Memcache object, to be passed to Minify::setCache().
| Memcache | $memcache | already-connected instance |
| int | $expire | seconds until expiration (default = 0 meaning the item will not get an expiration date) |
Definition at line 33 of file Memcache.php.
| display | ( | $ | id | ) |
Send the cached content to output
| string | $id | cache id |
Definition at line 87 of file Memcache.php.
| fetch | ( | $ | id | ) |
Fetch the cached content
| string | $id | cache id |
Definition at line 101 of file Memcache.php.
| getSize | ( | $ | id | ) |
Get the size of a cache entry
| string | $id | cache id |
Definition at line 61 of file Memcache.php.
| isValid | ( | $ | id, |
| $ | srcMtime | ||
| ) |
Does a valid cache entry exist?
| string | $id | cache id |
| int | $srcMtime | mtime of the original source file(s) |
Definition at line 77 of file Memcache.php.
| store | ( | $ | id, |
| $ | data | ||
| ) |
Write data to cache.
| string | $id | cache id |
| string | $data |
Definition at line 48 of file Memcache.php.