diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-28 17:49:43 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-29 15:04:55 +0100 |
commit | a7806076b1c20b80c0f1d1ee72e9050c8bda9715 (patch) | |
tree | ae66939f3fd896e3722115920e3d4160d8f82138 /lib/cache.php | |
parent | 5aec26a37c1661ac9782b7ab48fa0f11f560d1ef (diff) | |
download | nextcloud-server-a7806076b1c20b80c0f1d1ee72e9050c8bda9715.tar.gz nextcloud-server-a7806076b1c20b80c0f1d1ee72e9050c8bda9715.zip |
Move generating cache key from files from OC_Minimizer to OC_Cache
Diffstat (limited to 'lib/cache.php')
-rw-r--r-- | lib/cache.php | 9 |
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); + } } |