Skip to content

Commit a2f42ab

Browse files
author
Alannah Kearney
committed
Implemented cache enabled/disabled flag
1 parent b31ab7c commit a2f42ab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Lib/JsonFrontend.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public function display($page)
4949
// GET Requests on pages that are of type 'cacheable' can be cached.
5050
$isCacheable =
5151
(
52-
$_SERVER['REQUEST_METHOD'] == 'GET'
52+
\Extension_API_Framework::isCacheEnabled()
53+
&& $_SERVER['REQUEST_METHOD'] == 'GET'
5354
&& is_array($resolvedPage)
5455
&& in_array('cacheable', $resolvedPage['type'])
5556
);

0 commit comments

Comments
 (0)