SplashifyPath.php in Splashify 8.2
Namespace
Drupal\splashify\PageCacheFile
src/PageCache/SplashifyPath.phpView source
<?php
namespace Drupal\splashify\PageCache;
use Drupal\Core\PageCache\RequestPolicyInterface;
use Symfony\Component\HttpFoundation\Request;
/**
* Disable cache if splash exist.
*/
class SplashifyPath implements RequestPolicyInterface {
/**
* {@inheritdoc}
*/
public function check(Request $request) {
if (\Drupal::service('splashify.injection')
->isSplashExist($request)) {
\Drupal::service('page_cache_kill_switch')
->trigger();
return static::DENY;
}
return static::ALLOW;
}
}
Classes
Name | Description |
---|---|
SplashifyPath | Disable cache if splash exist. |