diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-03-30 19:44:38 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-03-30 19:44:49 +0200 |
commit | 65eee1f69dbbbe86bb4bf0716a464dc9f2c66a67 (patch) | |
tree | 65c97f31bb6285074bf408f0f3990d67e3221f95 /lib | |
parent | 284955573c59e91ed4cab7771487d1cebbb44262 (diff) | |
download | nextcloud-server-65eee1f69dbbbe86bb4bf0716a464dc9f2c66a67.tar.gz nextcloud-server-65eee1f69dbbbe86bb4bf0716a464dc9f2c66a67.zip |
clean pre-path_hash fscache entries
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filecache.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index a8c48e3f144..86d865ed9f3 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -637,6 +637,14 @@ class OC_FileCache{ self::fileSystemWatcherWrite(array('path'=>$path),$root); } } + + /** + * clean old pre-path_hash entries + */ + public static function clean(){ + $query=OC_DB::prepare('DELETE FROM *PREFIX*fscache WHERE LENGTH(path_hash)<30'); + $query->execute(); + } } //watch for changes and try to keep the cache up to date |