summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-11-09 18:41:57 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-11-09 18:41:57 +0100
commit5a6aba1e1114707942c613c2402eed3237b43a21 (patch)
tree5cda68cc0256db5a3b3002fa694026d7d1475128 /apps/files_sharing
parent5cc6635eb81a8d76c04ee040a791f51ebbe389ef (diff)
downloadnextcloud-server-5a6aba1e1114707942c613c2402eed3237b43a21.tar.gz
nextcloud-server-5a6aba1e1114707942c613c2402eed3237b43a21.zip
provide caching for file metadata
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib_share.php4
-rw-r--r--apps/files_sharing/sharedstorage.php12
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index cde33fd1dc5..c1957d7b6c4 100644
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -89,8 +89,8 @@ class OC_Share {
}
$query->execute(array($uid_owner, $uid, $source, $target, $permissions));
// Clear the folder size cache for the 'Shared' folder
- $clearFolderSize = OC_DB::prepare("DELETE FROM *PREFIX*foldersize WHERE path = ?");
- $clearFolderSize->execute(array($sharedFolder));
+// $clearFolderSize = OC_DB::prepare("DELETE FROM *PREFIX*foldersize WHERE path = ?");
+// $clearFolderSize->execute(array($sharedFolder));
}
}
}
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index b37806c75d9..5e5360e8991 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -225,8 +225,8 @@ class OC_Filestorage_Shared extends OC_Filestorage {
$path = ltrim($path, "/");
$path = preg_replace('{(/)\1+}', "/", $path);
$dbpath = rtrim($this->datadir.$path, "/");
- $query = OC_DB::prepare("SELECT size FROM *PREFIX*foldersize WHERE path = ?");
- $size = $query->execute(array($dbpath))->fetchAll();
+// $query = OC_DB::prepare("SELECT size FROM *PREFIX*foldersize WHERE path = ?");
+// $size = $query->execute(array($dbpath))->fetchAll();
if (count($size) > 0) {
return $size[0]['size'];
} else {
@@ -252,8 +252,8 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
if ($size > 0) {
$dbpath = rtrim($this->datadir.$path, "/");
- $query = OC_DB::prepare("INSERT INTO *PREFIX*foldersize VALUES(?,?)");
- $result = $query->execute(array($dbpath, $size));
+// $query = OC_DB::prepare("INSERT INTO *PREFIX*foldersize VALUES(?,?)");
+// $result = $query->execute(array($dbpath, $size));
}
}
return $size;
@@ -266,8 +266,8 @@ class OC_Filestorage_Shared extends OC_Filestorage {
$path = dirname($path);
}
$dbpath = rtrim($this->datadir.$path, "/");
- $query = OC_DB::prepare("DELETE FROM *PREFIX*foldersize WHERE path = ?");
- $result = $query->execute(array($dbpath));
+// $query = OC_DB::prepare("DELETE FROM *PREFIX*/*foldersize*/ WHERE path = ?");
+// $result = $query->execute(array($dbpath));
if ($path != "/" && $path != "") {
$parts = explode("/", $path);
$part = array_pop($parts);