Skip to content

Commit

Permalink
Fix EZP-16874: view cache file written when cache_ttl=0 is set in tem…
Browse files Browse the repository at this point in the history
…plate

Fix the issue: 
if  {set-block scope=global variable=cache_ttl}0{/set-block} is set in view full template, 
no cache file should be generated to reduce io write calls and storage size
  • Loading branch information
fwoldt committed Aug 27, 2018
1 parent ad17157 commit d2d6fd4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/classes/eznodeviewfunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ static public function contentViewGenerate( $file, $args )
$validation
);

// by setting cache_ttl to 0 in tpl code no cachfile should be generated
if ( isset( $result['no_cache'] ) and $result['no_cache'] )
{
$noCache = true;
}

// 'store' depends on noCache: if $noCache is set, this means that retrieve
// returned it, and the noCache fake cache file is already stored
// and should not be stored again
Expand Down

0 comments on commit d2d6fd4

Please sign in to comment.