summaryrefslogtreecommitdiffstats
path: root/lib/private/cache
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/cache')
-rw-r--r--lib/private/cache/file.php9
-rw-r--r--lib/private/cache/fileglobal.php12
-rw-r--r--lib/private/cache/usercache.php2
3 files changed, 20 insertions, 3 deletions
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php
index b0738d2a92b..8a6ef39f61b 100644
--- a/lib/private/cache/file.php
+++ b/lib/private/cache/file.php
@@ -29,6 +29,9 @@ class File {
}
}
+ /**
+ * @param string $key
+ */
public function get($key) {
$result = null;
$proxyStatus = \OC_FileProxy::$enabled;
@@ -59,6 +62,9 @@ class File {
return $result;
}
+ /**
+ * @param string $key
+ */
public function set($key, $value, $ttl=0) {
$storage = $this->getStorage();
$result = false;
@@ -87,6 +93,9 @@ class File {
return false;
}
+ /**
+ * @param string $key
+ */
public function remove($key) {
$storage = $this->getStorage();
if(!$storage) {
diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php
index bd049bba4d0..d9e0fd46d37 100644
--- a/lib/private/cache/fileglobal.php
+++ b/lib/private/cache/fileglobal.php
@@ -21,6 +21,9 @@ class FileGlobal {
return str_replace('/', '_', $key);
}
+ /**
+ * @param string $key
+ */
public function get($key) {
$key = $this->fixKey($key);
if ($this->hasKey($key)) {
@@ -30,6 +33,10 @@ class FileGlobal {
return null;
}
+ /**
+ * @param string $key
+ * @param string $value
+ */
public function set($key, $value, $ttl=0) {
$key = $this->fixKey($key);
$cache_dir = self::getCacheDir();
@@ -81,13 +88,14 @@ class FileGlobal {
}
static public function gc() {
- $last_run = \OC_AppConfig::getValue('core', 'global_cache_gc_lastrun', 0);
+ $appConfig = \OC::$server->getAppConfig();
+ $last_run = $appConfig->getValue('core', 'global_cache_gc_lastrun', 0);
$now = time();
if (($now - $last_run) < 300) {
// only do cleanup every 5 minutes
return;
}
- \OC_AppConfig::setValue('core', 'global_cache_gc_lastrun', $now);
+ $appConfig->setValue('core', 'global_cache_gc_lastrun', $now);
$cache_dir = self::getCacheDir();
if($cache_dir and is_dir($cache_dir)) {
$dh=opendir($cache_dir);
diff --git a/lib/private/cache/usercache.php b/lib/private/cache/usercache.php
index baa8820700b..486e08218a2 100644
--- a/lib/private/cache/usercache.php
+++ b/lib/private/cache/usercache.php
@@ -35,7 +35,7 @@ class UserCache implements \OCP\ICache {
* Set a value in the user cache
*
* @param string $key
- * @param mixed $value
+ * @param string $value
* @param int $ttl Time To Live in seconds. Defaults to 60*60*24
* @return bool
*/