diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-21 20:36:16 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-21 20:36:16 -0400 |
commit | 1d16a53c480ea7eb93ba118f6ffd69131eb5f3c5 (patch) | |
tree | 822a3a22ce1411a1ad10665c6c7b8f3b6c2ed3b5 /app/Core/Cache | |
parent | 8e83e404fbb1d0dc770e5b41fa315a674541459a (diff) |
Store comment sorting direction in user metadata
Diffstat (limited to 'app/Core/Cache')
-rw-r--r-- | app/Core/Cache/BaseCache.php | 35 | ||||
-rw-r--r-- | app/Core/Cache/CacheInterface.php | 45 |
2 files changed, 46 insertions, 34 deletions
diff --git a/app/Core/Cache/BaseCache.php b/app/Core/Cache/BaseCache.php index 04f8d220..b51c4c0c 100644 --- a/app/Core/Cache/BaseCache.php +++ b/app/Core/Cache/BaseCache.php @@ -8,42 +8,9 @@ namespace Kanboard\Core\Cache; * @package Kanboard\Core\Cache * @author Frederic Guillot */ -abstract class BaseCache +abstract class BaseCache implements CacheInterface { /** - * Store an item in the cache - * - * @access public - * @param string $key - * @param string $value - */ - abstract 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 - */ - abstract public function get($key); - - /** - * Remove all items from the cache - * - * @access public - */ - abstract public function flush(); - - /** - * Remove an item from the cache - * - * @access public - * @param string $key - */ - abstract public function remove($key); - - /** * Proxy cache * * Note: Arguments must be scalar types 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); +} |