mirror of
https://github.com/friendica/friendica
synced 2025-04-28 07:44:23 +02:00
Improve doc blocks in cache drivers
This commit is contained in:
parent
d1148f61ea
commit
640f76b05a
4 changed files with 48 additions and 6 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue