Browse Source

Merge pull request #427 from GuideToIceland/fix-wrong-cache-sanitize-comment

Updated description on `_sanitize_id` to reflect actual behaviour
Tobias Oitzinger 4 years ago
parent
commit
2324b2ca9b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      modules/cache/classes/Kohana/Cache.php

+ 4 - 1
modules/cache/classes/Kohana/Cache.php

@@ -293,7 +293,10 @@ abstract class Kohana_Cache {
 	abstract public function delete_all();
 
     /**
-     * Replaces troublesome characters with underscores and adds prefix to avoid duplicates
+     * Takes the sha1 of the id and adds prefix to avoid duplicates
+     *
+     * The id is converted to a sha1 to prevent any issues with
+     * id length or any special character
      *
      *     // Sanitize a cache id
      *     $id = $this->_sanitize_id($id);