chore: add tools for manually administrating the configured cache (#3867)

This commit is contained in:
Dag 2024-01-09 20:33:35 +01:00 committed by GitHub
parent 3ce94409ab
commit 0bf5dbbc0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 95 additions and 45 deletions

View file

@ -37,6 +37,7 @@ class CacheFactory
if ($index === false) {
throw new \InvalidArgumentException(sprintf('Invalid cache name: "%s"', $name));
}
$className = $cacheNames[$index] . 'Cache';
if (!preg_match('/^[A-Z][a-zA-Z0-9-]*$/', $className)) {
throw new \InvalidArgumentException(sprintf('Invalid cache classname: "%s"', $className));