We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents decb0bc + d923a3a commit 88cb7d9Copy full SHA for 88cb7d9
src/AbstractCachePool.php
@@ -168,6 +168,11 @@ abstract protected function clearOneObjectFromCache($key);
168
*/
169
public function save(CacheItemInterface $item)
170
{
171
+ // This item has no data
172
+ if (!$item->isHit()) {
173
+ return false;
174
+ }
175
+
176
if ($item instanceof TaggableItemInterface) {
177
$key = $item->getTaggedKey();
178
} else {
@@ -238,7 +243,7 @@ protected function validateKey($key)
238
243
));
239
244
}
240
245
241
- if (preg_match('|[\{\}\(\)/\\@\:]|', $key)) {
246
+ if (preg_match('|[\{\}\(\)/\\\@\:]|', $key)) {
242
247
throw new InvalidArgumentException(sprintf(
248
'Invalid key: "%s". The key contains one or more characters reserved for future extension: {}()/\@:',
249
$key
0 commit comments