File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -100,15 +100,16 @@ public function actionIndex(string $pattern): Response
100100 ArrayHelper::remove ($ config , 'cache ' , true ) &&
101101 !($ this ->request ->getIsPreview () || $ this ->request ->getIsLivePreview ())
102102 );
103+
104+ $ cacheKey = ArrayHelper::remove ($ config , 'cacheKey ' )
105+ ?? implode (': ' , [
106+ 'elementapi ' ,
107+ Craft::$ app ->getSites ()->getCurrentSite ()->id ,
108+ $ this ->request ->getPathInfo (),
109+ $ this ->request ->getQueryStringWithoutPath (),
110+ ]);
103111
104112 if ($ cache ) {
105- $ cacheKey = ArrayHelper::remove ($ config , 'cacheKey ' )
106- ?? implode (': ' , [
107- 'elementapi ' ,
108- Craft::$ app ->getSites ()->getCurrentSite ()->id ,
109- $ this ->request ->getPathInfo (),
110- $ this ->request ->getQueryStringWithoutPath (),
111- ]);
112113 $ cacheService = Craft::$ app ->getCache ();
113114
114115 if (($ cachedContent = $ cacheService ->get ($ cacheKey )) !== false ) {
You can’t perform that action at this time.
0 commit comments