* @package Mammut\Cache */ interface iCache { /** * Sets a value in the cache * @param string $key the entry key * @param mixed $value a value or a function providing the value * @param int $ttl the cache lifetime in seconds */ public function set($key, $value, $ttl); /** * Receives a value from the cache * @param string $key the entry key * @param string $default a value or a function providing a default value */ public function get($key, $default = NULL); public function delete($key); public function keyExists($key); public function clear(); public function getHits(); }