@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | { |
17 | 17 | public function onBeforeInit() |
18 | 18 | { |
19 | - if(Security::getCurrentUser()) { |
|
19 | + if (Security::getCurrentUser()) { |
|
20 | 20 | return; |
21 | 21 | } |
22 | 22 | if (Versioned::LIVE !== Versioned::get_stage()) { |
@@ -28,20 +28,20 @@ discard block |
||
28 | 28 | if (empty($dataRecord)) { |
29 | 29 | return; |
30 | 30 | } |
31 | - if($dataRecord->NeverCachePublicly) { |
|
31 | + if ($dataRecord->NeverCachePublicly) { |
|
32 | 32 | HTTPCacheControlMiddleware::singleton() |
33 | 33 | ->disableCache() |
34 | 34 | ; |
35 | 35 | return; |
36 | 36 | } |
37 | - if($dataRecord->PublicCacheDurationInSeconds === -1 || $dataRecord->PublicCacheDurationInSeconds === 0) { |
|
37 | + if ($dataRecord->PublicCacheDurationInSeconds === -1 || $dataRecord->PublicCacheDurationInSeconds === 0) { |
|
38 | 38 | HTTPCacheControlMiddleware::singleton() |
39 | 39 | ->disableCache() |
40 | 40 | ; |
41 | 41 | return; |
42 | 42 | } |
43 | 43 | $sc = SiteConfig::current_site_config(); |
44 | - if($sc->HasCaching) { |
|
44 | + if ($sc->HasCaching) { |
|
45 | 45 | $cacheTime = $dataRecord->PublicCacheDurationInSecond ?: $sc->PublicCacheDurationInSeconds; |
46 | 46 | HTTPCacheControlMiddleware::singleton() |
47 | 47 | ->enableCache() |