Skip to content
Snippets Groups Projects
Commit 3140e1c9 authored by André Lahmann's avatar André Lahmann Committed by Demian Katz
Browse files

* adds removeCachedData() to ILS\Driver\AbstractBase to allow explicit removal...

* adds removeCachedData() to ILS\Driver\AbstractBase to allow explicit removal of cached data (#747)
parent 60cc7ae5
Branches
Tags
No related merge requests found
...@@ -155,4 +155,20 @@ abstract class AbstractBase implements DriverInterface ...@@ -155,4 +155,20 @@ abstract class AbstractBase implements DriverInterface
]; ];
$this->cache->setItem($this->formatCacheKey($key), $item); $this->cache->setItem($this->formatCacheKey($key), $item);
} }
/**
* Helper function for removing cached data.
*
* @param string $key Cache entry key
*
* @return void
*/
protected function removeCachedData($key)
{
// Don't write to cache if we don't have a cache!
if (null === $this->cache) {
return;
}
$this->cache->removeItem($this->formatCacheKey($key));
}
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment