/** * Generates a unique key used for storing session data in cache. * @param string $id session variable name * @return string a safe cache key associated with the session variable name */ protected function getKey($id) { $ns = $this->aerospike->namespace; $set = $this->aerospike->set; $key = $this->keyPrefix . md5(json_encode([__CLASS__, $id])); return $this->aerospike->getConnection()->initKey($ns, $set, $key); }
/** * @inheritdoc */ protected function deleteValue($key) { $db = $this->aerospike->getConnection(); return $db->remove($key) == 0 ? true : false; }