diff options
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 |