diff options
Diffstat (limited to 'app/Core/Cache/CacheInterface.php')
-rw-r--r-- | app/Core/Cache/CacheInterface.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app/Core/Cache/CacheInterface.php b/app/Core/Cache/CacheInterface.php new file mode 100644 index 00000000..19bd6ef7 --- /dev/null +++ b/app/Core/Cache/CacheInterface.php @@ -0,0 +1,45 @@ +<?php + +namespace Kanboard\Core\Cache; + +/** + * Interface CacheInterface + * + * @package Kanboard\Core\Cache + * @author Frederic Guillot + */ +interface CacheInterface +{ + /** + * Store an item in the cache + * + * @access public + * @param string $key + * @param string $value + */ + public function set($key, $value); + + /** + * Retrieve an item from the cache by key + * + * @access public + * @param string $key + * @return mixed Null when not found, cached value otherwise + */ + public function get($key); + + /** + * Remove all items from the cache + * + * @access public + */ + public function flush(); + + /** + * Remove an item from the cache + * + * @access public + * @param string $key + */ + public function remove($key); +} |