File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Release Notes for Element API
22
3+ ## 2.8.2 - 2021-09-03
4+
5+ ### Fixed
6+ - Fixed a bug where custom ` cache ` durations were getting ignored. ([ #153 ] ( https://github.com/craftcms/element-api/issues/153 ) )
7+
38## 2.8.1 - 2021-09-01
49
510### Fixed
Original file line number Diff line number Diff line change 11{
22 "name" : " craftcms/element-api" ,
33 "description" : " Create a JSON API for your elements in Craft" ,
4- "version" : " 2.8.1 " ,
4+ "version" : " 2.8.2 " ,
55 "type" : " craft-plugin" ,
66 "keywords" : [
77 " api" ,
Original file line number Diff line number Diff line change @@ -88,10 +88,11 @@ public function actionIndex(string $pattern): Response
8888 $ this ->response ->getHeaders ()->setDefault ('X-Robots-Tag ' , 'none ' );
8989
9090 // Before anything else, check the cache
91- $ cache = (
92- ArrayHelper::remove ($ config , 'cache ' , true ) &&
93- !($ this ->request ->getIsPreview () || $ this ->request ->getIsLivePreview ())
94- );
91+ if (!($ this ->request ->getIsPreview () || $ this ->request ->getIsLivePreview ())) {
92+ $ cache = ArrayHelper::remove ($ config , 'cache ' , true );
93+ } else {
94+ $ cache = false ;
95+ }
9596
9697 $ cacheKey = ArrayHelper::remove ($ config , 'cacheKey ' )
9798 ?? implode (': ' , [
You can’t perform that action at this time.
0 commit comments