diff options
author | Henrik Kjölhede <hkjolhede@gmail.com> | 2013-01-26 21:51:18 +0100 |
---|---|---|
committer | Henrik Kjölhede <hkjolhede@gmail.com> | 2013-01-26 21:51:18 +0100 |
commit | b1b2eafa50db54b2613cf2bc52bfab2015d67b2f (patch) | |
tree | 68992916824e3bdd4c6ba9ab5af955420bfd8123 /lib/filecache.php | |
parent | a26d50640fc4a2524255c85b10fb010676b3e22d (diff) | |
parent | c9e25d3fab17b178759dd6d2f9488aa4cf37fbbb (diff) | |
download | nextcloud-server-b1b2eafa50db54b2613cf2bc52bfab2015d67b2f.tar.gz nextcloud-server-b1b2eafa50db54b2613cf2bc52bfab2015d67b2f.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
apps/files_external/lib/config.php
Diffstat (limited to 'lib/filecache.php')
-rw-r--r-- | lib/filecache.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index c3256c783e6..7764890ef1a 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -23,9 +23,14 @@ * provide caching for filesystem info in the database * * not used by OC_Filesystem for reading filesystem info, - * instread apps should use OC_FileCache::get where possible + * instead apps should use OC_FileCache::get where possible + * + * It will try to keep the data up to date but changes from outside + * ownCloud can invalidate the cache + * + * Methods that take $path and $root params expect $path to be relative, like + * /admin/files/file.txt, if $root is false * - * It will try to keep the data up to date but changes from outside ownCloud can invalidate the cache */ class OC_FileCache{ @@ -59,7 +64,7 @@ class OC_FileCache{ * @param string $path * @param array data * @param string root (optional) - * @note $data is an associative array in the same format as returned + * @note $data is an associative array in the same format as returned * by get */ public static function put($path, $data, $root=false) { @@ -206,7 +211,7 @@ class OC_FileCache{ OC_Cache::remove('fileid/'.$root.$path); } - + /** * return array of filenames matching the querty * @param string $query @@ -354,7 +359,7 @@ class OC_FileCache{ public static function increaseSize($path, $sizeDiff, $root=false) { if($sizeDiff==0) return; $item = OC_FileCache_Cached::get($path); - //stop walking up the filetree if we hit a non-folder or reached to root folder + //stop walking up the filetree if we hit a non-folder or reached the root folder if($path == '/' || $path=='' || $item['mimetype'] !== 'httpd/unix-directory') { return; } |