aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cache.php')
-rw-r--r--lib/cache.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/cache.php b/lib/cache.php
index 62003793d5f..bc74ed83f8b 100644
--- a/lib/cache.php
+++ b/lib/cache.php
@@ -144,4 +144,13 @@ class OC_Cache {
return self::$isFast;
}
+ static public function generateCacheKeyFromFiles($files) {
+ $key = '';
+ sort($files);
+ foreach($files as $file) {
+ $stat = stat($file);
+ $key .= $file.$stat['mtime'].$stat['size'];
+ }
+ return md5($key);
+ }
}