Improve doc blocks in cache drivers

This commit is contained in:
Hypolite Petovan 2018-09-25 22:51:41 -04:00
parent d1148f61ea
commit 640f76b05a
4 changed files with 48 additions and 6 deletions

View file

@ -53,6 +53,9 @@ class MemcachedCacheDriver extends AbstractCacheDriver implements IMemoryCacheDr
}
}
/**
* (@inheritdoc)
*/
public function get($key)
{
$return = null;
@ -68,6 +71,9 @@ class MemcachedCacheDriver extends AbstractCacheDriver implements IMemoryCacheDr
return $return;
}
/**
* (@inheritdoc)
*/
public function set($key, $value, $ttl = Cache::FIVE_MINUTES)
{
$cachekey = $this->getCacheKey($key);
@ -88,12 +94,18 @@ class MemcachedCacheDriver extends AbstractCacheDriver implements IMemoryCacheDr
}
/**
* (@inheritdoc)
*/
public function delete($key)
{
$cachekey = $this->getCacheKey($key);
return $this->memcached->delete($cachekey);
}
/**
* (@inheritdoc)
*/
public function clear($outdated = true)
{
if ($outdated) {
@ -104,12 +116,7 @@ class MemcachedCacheDriver extends AbstractCacheDriver implements IMemoryCacheDr
}
/**
* @brief Sets a value if it's not already stored
*
* @param string $key The cache key
* @param mixed $value The old value we know from the cache
* @param int $ttl The cache lifespan, must be one of the Cache constants
* @return bool
* (@inheritdoc)
*/
public function add($key, $value, $ttl = Cache::FIVE_MINUTES)
{