2018-07-05 19:47:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Core\Cache;
|
|
|
|
use Friendica\BaseObject;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract class for common used functions
|
|
|
|
*
|
|
|
|
* Class AbstractCacheDriver
|
|
|
|
*
|
|
|
|
* @package Friendica\Core\Cache
|
|
|
|
*/
|
2018-07-05 19:54:20 +00:00
|
|
|
abstract class AbstractCacheDriver extends BaseObject
|
2018-07-05 19:47:52 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param string $key The original key
|
|
|
|
* @return string The cache key used for the cache
|
|
|
|
*/
|
|
|
|
protected function getCacheKey($key) {
|
2018-07-07 14:15:03 +00:00
|
|
|
// We fetch with the hostname as key to avoid problems with other applications
|
2018-07-05 19:47:52 +00:00
|
|
|
return self::getApp()->get_hostname() . ":" . $key;
|
|
|
|
}
|
2018-07-05 20:01:33 +00:00
|
|
|
}
|