File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,6 @@ abstract class DrupalMemcacheBase implements DrupalMemcacheInterface {
3131 */
3232 protected $ memcache ;
3333
34- /**
35- * The hash algorithm to pass to hash(). Defaults to 'sha1'
36- *
37- * @var string
38- */
39- protected $ hashAlgorithm ;
40-
4134 /**
4235 * The prefix memcache key for all keys.
4336 *
@@ -54,7 +47,6 @@ abstract class DrupalMemcacheBase implements DrupalMemcacheInterface {
5447 public function __construct (DrupalMemcacheConfig $ settings ) {
5548 $ this ->settings = $ settings ;
5649
57- $ this ->hashAlgorithm = $ this ->settings ->get ('key_hash_algorithm ' , 'sha1 ' );
5850 $ this ->prefix = $ this ->settings ->get ('key_prefix ' , '' );
5951 }
6052
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ protected function normalizeKey($key) {
2929 // quickly with minimal collisions.
3030 // Return a string that uses as much as possible of the original cache ID
3131 // with the hash appended.
32- $ hash = hash ($ this ->hashAlgorithm , $ this ->prefix . '- ' . $ key );
32+ $ hash_algorithm = $ this ->settings ->get ('key_hash_algorithm ' , 'sha1 ' );
33+ $ hash = hash ($ hash_algorithm , $ key );
3334 if (!$ key_is_ascii ) {
3435 return $ hash ;
3536 }
You can’t perform that action at this time.
0 commit comments