We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0649ab commit df3a0b7Copy full SHA for df3a0b7
1 file changed
src/controllers/DefaultController.php
@@ -89,12 +89,12 @@ public function actionIndex(string $pattern): Response
89
$this->response->getHeaders()->setDefault('X-Robots-Tag', 'none');
90
91
// Before anything else, check the cache
92
- if (!($this->request->getIsPreview() || $this->request->getIsLivePreview())) {
93
- $cache = ArrayHelper::remove($config, 'cache', true);
94
- } else {
+ $cache = ArrayHelper::remove($config, 'cache', true);
+ if ($this->request->getIsPreview() || $this->request->getIsLivePreview()) {
+ // Ignore config & disable cache for live preview
95
$cache = false;
96
}
97
-
+
98
$cacheKey = ArrayHelper::remove($config, 'cacheKey')
99
?? implode(':', [
100
'elementapi',
0 commit comments