public static function QPCache::set in QueryPath 7.2
Same name and namespace in other branches
- 6 qpcache/qpcache.module \QPCache::set()
- 7.3 qpcache/qpcache.module \QPCache::set()
Put a value in the cache.
This will overwrite any existing entry with the same key.
Parameters
$key: A string value.
$body: The text value to store.
$expire: An expiration date in UNIX timestamp format.
2 calls to QPCache::set()
- qpcache_qp in qpcache/
qpcache.module - Factory for creating a QueryPath object.
- qpcache_set in qpcache/
qpcache.module - Set an object in the cache.
File
- qpcache/
qpcache.module, line 256 - The main file for qpcache.
Class
- QPCache
- This is a special-purpose XML cache.
Code
public static function set($key, $body, $expire = 0) {
list($crckey, $hashkey) = self::genMultiKey($key);
db_delete('qpcache_xmlcache')
->condition('hashkey', $hashkey);
db_insert('qpcache_xmlcache')
->fields(array(
'crckey' => $crckey,
'hashkey' => $hashkey,
'clearkey' => $key,
'body' => $body,
'expire' => $expire,
));
}