You are here

class WsfieldStorageDrupalDatabaseCache in Web Service Data 7

Hierarchy

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);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DrupalDatabaseCache::$bin protected property
DrupalDatabaseCache::clear function Implements DrupalCacheInterface::clear(). Overrides DrupalCacheInterface::clear 1
DrupalDatabaseCache::garbageCollection protected function Garbage collection for get() and getMultiple().
DrupalDatabaseCache::get function Implements DrupalCacheInterface::get(). Overrides DrupalCacheInterface::get 1
DrupalDatabaseCache::getMultiple function Implements DrupalCacheInterface::getMultiple(). Overrides DrupalCacheInterface::getMultiple 1
DrupalDatabaseCache::isEmpty function Implements DrupalCacheInterface::isEmpty(). Overrides DrupalCacheInterface::isEmpty 1
DrupalDatabaseCache::isValidBin function Checks if $this->bin represents a valid cache table.
DrupalDatabaseCache::prepareItem protected function Prepares a cached item.
DrupalDatabaseCache::__construct function Constructs a DrupalDatabaseCache object.
WsfieldStorageDrupalDatabaseCache::set function Implements DrupalCacheInterface::set(). Overrides DrupalDatabaseCache::set