[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/minify/lib/Minify/Cache/ -> Memcache.php (summary)

Class Minify_Cache_Memcache

File Size: 140 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Minify_Cache_Memcache:: (7 methods):
  __construct()
  store()
  getSize()
  isValid()
  display()
  fetch()
  _fetch()


Class: Minify_Cache_Memcache  - X-Ref

Memcache-based cache class for Minify

<code>
// 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();
}
</code>
__construct($memcache, $expire = 0)   X-Ref
Create a Minify_Cache_Memcache object, to be passed to
Minify::setCache().

param: Memcache $memcache already-connected instance
param: int $expire seconds until expiration (default = 0
return: null

store($id, $data)   X-Ref
Write data to cache.

param: string $id cache id
param: string $data
return: bool success

getSize($id)   X-Ref
Get the size of a cache entry

param: string $id cache id
return: int size in bytes

isValid($id, $srcMtime)   X-Ref
Does a valid cache entry exist?

param: string $id cache id
param: int $srcMtime mtime of the original source file(s)
return: bool exists

display($id)   X-Ref
Send the cached content to output

param: string $id cache id

fetch($id)   X-Ref
Fetch the cached content

param: string $id cache id
return: string

_fetch($id)   X-Ref
Fetch data and timestamp from memcache, store in instance

param: string $id
return: bool success



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1