/** * Set the desired lifetime in seconds for a record before it's considered * stale. * Once it's stale it will be eventually wiped out next time you try to * retrieve it or call refresh(). * IMPORTANT: if you want records to last forever, set this value to zero. * * * @param unknown_type $time * @return void */ public static function setLifetime($time) { if (is_integer($time) && $time >= 0) { self::$stale_age = $time; return true; } return false; }
private static function extractContext($label) { if (is_null($label)) { return "_global_context_"; } if (is_object($label)) { $label = sha1(serialize($label)); return $label; } if (PersistenceEngine::validateContext($label)) { return $label; } return false; }
public function __construct($ctx, $connectionString) { $this->dbc = DBCFactory::getConnector($ctx, $connectionString); parent::__construct($ctx); $this->dbc->createTable($ctx); }
public function __construct($context) { parent::__construct($context); }