name = $bin; if (isset($conf['cacherouter'][$bin]['prefix'])) { $this->prefix = $conf['cacherouter'][$bin]['prefix']; } else if (isset($conf['cacherouter']['default']['prefix'])) { $this->prefix = $conf['cacherouter']['default']['prefix']; } $this->lookup = $this->prefix .'lookup_'. $bin; $this->lock = $this->prefix .'lock_'. $bin; } function get($key) { if (isset($this->content[$key])) { return $this->content[$key]; } } function set($key, $value) { $this->content[$key] = $value; } function delete($key) { unset($this->content[$key]); } function flush() { $this->content = array(); } /** * key() * Get the full key of the item * * @param string $key * The key to set. * @return string * Returns the full key of the cache item. */ function key($key) { return urlencode($this->prefix .'-'. $this->name .'-'. $key); } }