@@ -309,13 +309,13 @@ |
||
| 309 | 309 | * Stuff below here is executed *after* we have flushed output, |
| 310 | 310 | * so here we should only write out our caches but do nothing else |
| 311 | 311 | */ |
| 312 | - if ($this->_uncached) { |
|
| 313 | - debug_add('Not writing cache file, we are in uncached operation mode.'); |
|
| 314 | - return; |
|
| 315 | - } |
|
| 316 | - $content_id = 'C-' . $etag; |
|
| 317 | - $this->write_meta_cache($content_id, $request, $response); |
|
| 318 | - $this->_data_cache->save($content_id, $cache_data); |
|
| 312 | + if ($this->_uncached) { |
|
| 313 | + debug_add('Not writing cache file, we are in uncached operation mode.'); |
|
| 314 | + return; |
|
| 315 | + } |
|
| 316 | + $content_id = 'C-' . $etag; |
|
| 317 | + $this->write_meta_cache($content_id, $request, $response); |
|
| 318 | + $this->_data_cache->save($content_id, $cache_data); |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | /** |
@@ -395,8 +395,8 @@ discard block |
||
| 395 | 395 | $this->_uncached = midcom::get()->config->get('cache_module_content_uncached'); |
| 396 | 396 | $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy'); |
| 397 | 397 | $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated'); |
| 398 | - $this->_default_lifetime = (int)midcom::get()->config->get('cache_module_content_default_lifetime'); |
|
| 399 | - $this->_default_lifetime_authenticated = (int)midcom::get()->config->get('cache_module_content_default_lifetime_authenticated'); |
|
| 398 | + $this->_default_lifetime = (int) midcom::get()->config->get('cache_module_content_default_lifetime'); |
|
| 399 | + $this->_default_lifetime_authenticated = (int) midcom::get()->config->get('cache_module_content_default_lifetime_authenticated'); |
|
| 400 | 400 | |
| 401 | 401 | if ($this->_headers_strategy == 'no-cache') { |
| 402 | 402 | $this->no_cache(); |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | */ |
| 496 | 496 | public function expires($timestamp) |
| 497 | 497 | { |
| 498 | - if ( $this->_expires === null |
|
| 498 | + if ($this->_expires === null |
|
| 499 | 499 | || $this->_expires > $timestamp) { |
| 500 | 500 | $this->_expires = $timestamp; |
| 501 | 501 | } |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | */ |
| 614 | 614 | public function write_meta_cache($content_id, Request $request, Response $response) |
| 615 | 615 | { |
| 616 | - if ( $this->_uncached |
|
| 616 | + if ($this->_uncached |
|
| 617 | 617 | || $this->_no_cache) { |
| 618 | 618 | return; |
| 619 | 619 | } |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | |
| 683 | 683 | public function store_dl_content($context, $dl_cache_data, Request $request) |
| 684 | 684 | { |
| 685 | - if ( $this->_no_cache |
|
| 685 | + if ($this->_no_cache |
|
| 686 | 686 | || $this->_uncached) { |
| 687 | 687 | return; |
| 688 | 688 | } |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | // Add Expiration and Cache Control headers |
| 771 | 771 | $strategy = $this->_headers_strategy; |
| 772 | 772 | $default_lifetime = $this->_default_lifetime; |
| 773 | - if ( midcom::get()->auth->is_valid_user() |
|
| 773 | + if (midcom::get()->auth->is_valid_user() |
|
| 774 | 774 | || midcom_connection::get_user()) { |
| 775 | 775 | $strategy = $this->_headers_strategy_authenticated; |
| 776 | 776 | $default_lifetime = $this->_default_lifetime_authenticated; |