2011-06-08 23:45:08 -05:00
|
|
|
<?php namespace System\Cache;
|
|
|
|
|
|
|
|
|
|
interface Driver {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Determine if an item exists in the cache.
|
|
|
|
|
*
|
|
|
|
|
* @param string $key
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
public function has($key);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get an item from the cache.
|
|
|
|
|
*
|
|
|
|
|
* @param string $key
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
2011-07-07 07:39:26 -07:00
|
|
|
public function get($key);
|
2011-06-08 23:45:08 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Write an item to the cache.
|
|
|
|
|
*
|
|
|
|
|
* @param string $key
|
|
|
|
|
* @param mixed $value
|
|
|
|
|
* @param int $minutes
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function put($key, $value, $minutes);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete an item from the cache.
|
|
|
|
|
*
|
|
|
|
|
* @param string $key
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function forget($key);
|
|
|
|
|
|
|
|
|
|
}
|