- Move constants to the "Cache" class (more transparent than inside the interface)

This commit is contained in:
Philipp Holzer 2019-08-04 15:51:49 +02:00
parent 34e4968c06
commit 19777baa79
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
18 changed files with 59 additions and 69 deletions

View file

@ -3,7 +3,6 @@
namespace Friendica\Core\Cache;
use Exception;
use Friendica\Core\Cache;
use Friendica\Core\Config\Configuration;
use Memcache;
@ -12,7 +11,7 @@ use Memcache;
*
* @author Hypolite Petovan <hypolite@mrpetovan.com>
*/
class MemcacheCache extends AbstractCache implements IMemoryCache
class MemcacheCache extends Cache implements IMemoryCache
{
use TraitCompareSet;
use TraitCompareDelete;
@ -48,7 +47,7 @@ class MemcacheCache extends AbstractCache implements IMemoryCache
*/
public function getAllKeys($prefix = null)
{
$keys = [];
$keys = [];
$allSlabs = $this->memcache->getExtendedStats('slabs');
foreach ($allSlabs as $slabs) {
foreach (array_keys($slabs) as $slabId) {
@ -72,7 +71,7 @@ class MemcacheCache extends AbstractCache implements IMemoryCache
*/
public function get($key)
{
$return = null;
$return = null;
$cachekey = $this->getCacheKey($key);
// We fetch with the hostname as key to avoid problems with other applications