class WsfieldStorageDrupalDatabaseCache in Web Service Data 7
Hierarchy
- class \DrupalDatabaseCache implements DrupalCacheInterface
Expanded class hierarchy of WsfieldStorageDrupalDatabaseCache
1 string reference to 'WsfieldStorageDrupalDatabaseCache'
- wsfield_storage_enable in modules/
wsfields_storage/ wsfields_storage.install - @file Storage controller definitions
File
- modules/
wsfields_storage/ wsfields_storage.cache.inc, line 3
View source
class WsfieldStorageDrupalDatabaseCache extends DrupalDatabaseCache {
function set($cid, $data, $expire = CACHE_PERMANENT) {
$cidparts = explode(':', $cid);
if ($cidparts[0] == 'field' and wsfields_storage_entity_has_wsfields($cidparts[1]) and $expire == CACHE_PERMANENT) {
$expirecid = 'wsfield_expire:' . $cidparts[1] . ':' . $cidparts[2];
$expire = cache_get($expirecid);
if ($expire) {
$expire = $expire->data;
}
else {
$expire = time() + variable_get('wsfields_min_expire', 300);
}
}
parent::set($cid, $data, $expire);
}
}