summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-25 00:10:02 +0200
committerRobin Appelman <icewind@owncloud.com>2012-04-25 00:12:12 +0200
commitcc2bfd313dd8f3210e136f99606ec01a3168fe2f (patch)
tree99b75c8aa34d3151e8e51cb83070ff36e8ac64f0 /lib
parent9015c46e317842184b414bce9192b62b969a5202 (diff)
downloadnextcloud-server-cc2bfd313dd8f3210e136f99606ec01a3168fe2f.tar.gz
nextcloud-server-cc2bfd313dd8f3210e136f99606ec01a3168fe2f.zip
minor filecache improvements
Diffstat (limited to 'lib')
-rw-r--r--lib/filecache.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 19286ff746b..28a9eb247a6 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -64,7 +64,7 @@ class OC_FileCache{
if(is_array($result)){
return $result;
}else{
- OC_Log::write('get(): file not found in cache ('.$path.')','core',OC_Log::DEBUG);
+ OC_Log::write('files','get(): file not found in cache ('.$path.')',OC_Log::DEBUG);
return false;
}
}
@@ -257,7 +257,7 @@ class OC_FileCache{
if(is_array($result)){
return $result;
}else{
- OC_Log::write('getFolderContent(): file not found in cache ('.$path.')','core',OC_Log::DEBUG);
+ OC_Log::write('files','getFolderContent(): file not found in cache ('.$path.')',OC_Log::DEBUG);
return false;
}
}
@@ -300,7 +300,7 @@ class OC_FileCache{
if(is_array($result)){
return $result['id'];
}else{
- OC_Log::write('getFileId(): file not found in cache ('.$path.')','core',OC_Log::DEBUG);
+ OC_Log::write('files','getFileId(): file not found in cache ('.$path.')',OC_Log::DEBUG);
return -1;
}
}
@@ -414,8 +414,12 @@ class OC_FileCache{
}
return $result;
}else{
- OC_Log::write('get(): file not found in cache ('.$path.')','core',OC_Log::DEBUG);
- return false;
+ OC_Log::write('files','getChached(): file not found in cache ('.$path.')',OC_Log::DEBUG);
+ if(isset(self::$savedData[$path])){
+ return self::$savedData[$path];
+ }else{
+ return array();
+ }
}
}
@@ -553,6 +557,7 @@ class OC_FileCache{
$view=new OC_FilesystemView(($root=='/')?'':$root);
}
if(!$view->is_readable($path)) return; //cant read, nothing we can do
+ clearstatcache();
$stat=$view->stat($path);
$mimetype=$view->getMimeType($path);
$writable=$view->is_writable($path);