Browse Source

Forward port #11581 to 3.x

Use the md5-sum of group keys instead of the actual group names. This
helps mitigate key overflow issues in redis and memcached.

It does change the cache keys used, but those have never been promised
to be backwards compatible.
Mark Story 8 years ago
parent
commit
3d46087f57
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Cache/CacheEngine.php

+ 1 - 1
src/Cache/CacheEngine.php

@@ -252,7 +252,7 @@ abstract class CacheEngine
 
         $prefix = '';
         if ($this->_groupPrefix) {
-            $prefix = vsprintf($this->_groupPrefix, $this->groups());
+            $prefix = md5(implode('_', $this->groups()));
         }
 
         $key = preg_replace('/[\s]+/', '_', strtolower(trim(str_replace([DIRECTORY_SEPARATOR, '/', '.'], '_', (string)$key))));