minor #18647 [Cache] Minor cleanup (nicolas-grekas)
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Minor cleanup
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
5786f3d
[Cache] Minor cleanup
This commit is contained in:
commit
e0696fadee
@ -323,7 +323,6 @@ abstract class AbstractAdapter implements AdapterInterface, LoggerAwareInterface
|
||||
CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', array('key' => substr($id, strlen($this->namespace)), 'type' => $type, 'exception' => $e instanceof \Exception ? $e : null));
|
||||
}
|
||||
}
|
||||
$this->deferred = array();
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ final class CacheItem implements CacheItemInterface
|
||||
throw new InvalidArgumentException('Cache key length must be greater than zero');
|
||||
}
|
||||
if (isset($key[strcspn($key, '{}()/\@:')])) {
|
||||
throw new InvalidArgumentException('Cache key contains reserved characters {}()/\@:');
|
||||
throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters {}()/\@:', $key));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user