@@ -142,8 +142,8 @@ discard block |
||
| 142 | 142 | $this->_uncached = $config->get('cache_module_content_uncached'); |
| 143 | 143 | $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy'); |
| 144 | 144 | $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated'); |
| 145 | - $this->_default_lifetime = (int)$config->get('cache_module_content_default_lifetime'); |
|
| 146 | - $this->_default_lifetime_authenticated = (int)$config->get('cache_module_content_default_lifetime_authenticated'); |
|
| 145 | + $this->_default_lifetime = (int) $config->get('cache_module_content_default_lifetime'); |
|
| 146 | + $this->_default_lifetime_authenticated = (int) $config->get('cache_module_content_default_lifetime_authenticated'); |
|
| 147 | 147 | |
| 148 | 148 | if ($this->_headers_strategy == 'no-cache') { |
| 149 | 149 | // we can't call no_cache() here, because it would try to call back to this class via the global getter |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | */ |
| 509 | 509 | private function write_meta_cache(string $content_id, Request $request, Response $response) |
| 510 | 510 | { |
| 511 | - if ( $this->_uncached |
|
| 511 | + if ($this->_uncached |
|
| 512 | 512 | || $this->_no_cache) { |
| 513 | 513 | return; |
| 514 | 514 | } |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | |
| 574 | 574 | private function store_dl_content(Request $request, Response $response) |
| 575 | 575 | { |
| 576 | - if ( $this->_no_cache |
|
| 576 | + if ($this->_no_cache |
|
| 577 | 577 | || $this->_uncached) { |
| 578 | 578 | return; |
| 579 | 579 | } |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | |
| 616 | 616 | /* TODO: Doublecheck the way this is handled, now we just don't send it |
| 617 | 617 | * if headers_strategy implies caching */ |
| 618 | - if ( !$response->headers->has('Content-Length') |
|
| 618 | + if (!$response->headers->has('Content-Length') |
|
| 619 | 619 | && !in_array($this->_headers_strategy, ['public', 'private'])) { |
| 620 | 620 | $response->headers->set("Content-Length", strlen($response->getContent())); |
| 621 | 621 | } |