#[Route(path: '/api/_action/cleanup', name: 'api.action.cache.cleanup', methods: ['DELETE'], defaults: ['_acl' => ['system:clear:cache']])]
public function clearOldCacheFolders(): Response
{ $this->cacheClearer->
scheduleCacheFolderCleanup();
return new Response('', Response::HTTP_NO_CONTENT
);
} #[Route(path: '/api/_action/container_cache', name: 'api.action.container-cache.delete', methods: ['DELETE'], defaults: ['_acl' => ['system:clear:cache']])]
public function clearContainerCache(): Response
{ $this->cacheClearer->
clearContainerCache();
return new Response('', Response::HTTP_NO_CONTENT
);
} private function getUsedCache(AdapterInterface
$adapter): string
{ if ($adapter instanceof TagAwareAdapter ||
$adapter instanceof TraceableAdapter
) { // Do not declare function as static
$func = \Closure::
bind(fn () =>
$adapter->pool,
$adapter,
$adapter::
class);
$adapter =
$func();
}