diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-30 04:11:28 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-30 04:11:28 -0700 |
commit | 480aeb804fc64be6fdcb1551f89e21304e270b33 (patch) | |
tree | f6bc00728db90071b6affea89b5c06c15909fe07 /lib/cache.php | |
parent | ebb2278a6770cc68698e1ba5cb914d615b573519 (diff) | |
parent | 629faf6d343e7906322d125718f97d3ac2f9569b (diff) | |
download | nextcloud-server-480aeb804fc64be6fdcb1551f89e21304e270b33.tar.gz nextcloud-server-480aeb804fc64be6fdcb1551f89e21304e270b33.zip |
Merge pull request #4459 from owncloud/appframework-master
Public API for OC6+ (includes AppFramework)
Diffstat (limited to 'lib/cache.php')
-rw-r--r-- | lib/cache.php | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/cache.php b/lib/cache.php index 48b9964ba9d..a311f10a00f 100644 --- a/lib/cache.php +++ b/lib/cache.php @@ -6,34 +6,36 @@ * See the COPYING-README file. */ -class OC_Cache { +namespace OC; + +class Cache { /** - * @var OC_Cache $user_cache + * @var Cache $user_cache */ static protected $user_cache; /** - * @var OC_Cache $global_cache + * @var Cache $global_cache */ static protected $global_cache; /** * get the global cache - * @return OC_Cache + * @return Cache */ static public function getGlobalCache() { if (!self::$global_cache) { - self::$global_cache = new OC_Cache_FileGlobal(); + self::$global_cache = new Cache\FileGlobal(); } return self::$global_cache; } /** * get the user cache - * @return OC_Cache + * @return Cache */ static public function getUserCache() { if (!self::$user_cache) { - self::$user_cache = new OC_Cache_File(); + self::$user_cache = new Cache\File(); } return self::$user_cache; } @@ -85,7 +87,7 @@ class OC_Cache { /** * clear the user cache of all entries starting with a prefix - * @param string prefix (optional) + * @param string $prefix (optional) * @return bool */ static public function clear($prefix='') { @@ -93,6 +95,11 @@ class OC_Cache { return $user_cache->clear($prefix); } + /** + * creates cache key based on the files given + * @param $files + * @return string + */ static public function generateCacheKeyFromFiles($files) { $key = ''; sort($files); |