function _getDataFromContainer($container) { if ($this->need_serialization) { return lmbSerializable::unserialize($container); } else { return $container; } }
function _getSingleKeyValue($resolved_key) { if (!($record = $this->db_table->selectFirstRecord($this->_getKeyCriteria($resolved_key)))) { return NULL; } $ttl = (int) $record['ttl']; if ($ttl && $ttl < time()) { return NULL; } return lmbSerializable::unserialize($record['value']); }
function _getSingleKeyValue($resolved_key) { if (is_null($value = $this->_getSession()->get($resolved_key))) { return NULL; } if ($this->need_serialization) { $value = lmbSerializable::unserialize($value); } $ttl = $this->_getSession()->get($resolved_key . 'ttl'); return $ttl && $ttl <= time() ? NULL : $value; }