2016-04-05 13:19:35 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Ion
|
|
|
|
*
|
|
|
|
* Building blocks for web development
|
|
|
|
*
|
|
|
|
* @package Ion
|
|
|
|
* @author Timothy J. Warren
|
|
|
|
* @copyright Copyright (c) 2015 - 2016
|
|
|
|
* @license MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Aviat\Ion\Cache;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface for cache drivers
|
|
|
|
*/
|
|
|
|
interface CacheDriverInterface {
|
|
|
|
/**
|
|
|
|
* Retreive a value from the cache backend
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function get($key);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a cached value
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
* @param mixed $value
|
|
|
|
* @return CacheDriverInterface
|
|
|
|
*/
|
|
|
|
public function set($key, $value);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalidate a cached value
|
|
|
|
*
|
|
|
|
* @param string $key
|
|
|
|
* @return CacheDriverInterface
|
|
|
|
*/
|
|
|
|
public function invalidate($key);
|
2016-04-06 12:11:07 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Clear the contents of the cache
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function invalidateAll();
|
2016-04-05 13:19:35 -04:00
|
|
|
}
|
2016-04-01 17:35:53 -04:00
|
|
|
// End of CacheDriverInterface.php
|