Skip to content

Commit

Permalink
Allow dashes (-) in cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed Jul 26, 2024
1 parent 279259f commit 9f80ffc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]

* The [PSR-6 definition on what makes a valid cache key](https://www.php-fig.org/psr/psr-6/#definitions), it is said that
keys must support keys consisting of the characters `A-Z`, `a-z`, `0-9`, `_`, and `.` in any order in UTF-8
encoding and a length of up to 64 characters. Implementing libraries MAY support additional characters and encodings
or longer lengths, but must support at least that minimum.
* Dashes (`-`) are now allowed in cache keys.


## [1.1.0] - 2024-03-02

* The Cache can now be instantiated without providing a [PSR-20](https://www.php-fig.org/psr/psr-20/) clock implementation.
Expand Down
1 change: 1 addition & 0 deletions tests/CacheKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public static function validValues(): array
return [
'single char' => ['x'],
'64 chars' => [str_repeat('x', 64)],
'all allowed chars' => ['aZ0_.-'],
];
}

Expand Down

0 comments on commit 9f80ffc

Please sign in to comment.