for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Quantum\Handlers;
use Quantum\Http\Response;
use Quantum\Libraries\ResourceCache\ViewCache;
class ViewCacheHandler
{
protected ViewCache $viewCache;
public function __construct()
$this->viewCache = ViewCache::getInstance();
}
public function serveCachedView(string $uri, Response $response): bool
if ($this->viewCache->isEnabled() && $this->viewCache->exists($uri)) {
$response->html($this->viewCache->get($uri));
return true;
return false;