Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

{elapsed_time} & {memory_usage} not beeing replaced in cache output with compression

$
0
0
Hi,

I have noticed that {elapsed_time} & {memory_usage} are not replaced when a page cache is displayed that has been compressed.

In the Output Class the order of processing is:

First write cache
Then replace the pseudo-variables with the data

PHP Code:
// Do we need to write a cache file? Only if the controller does not have its
 // own _output() method and we are not dealing with a cache file, which we
 // can determine by the existence of the $CI object above
 
if ($this->cache_expiration && isset($CI) && ! method_exists($CI'_output'))
 {
 
$this->_write_cache($output);
 }

 
// --------------------------------------------------------------------

 // Parse out the elapsed time and memory usage,
 // then swap the pseudo-variables with the data

 
$elapsed $BM->elapsed_time('total_execution_time_start''total_execution_time_end');

 if (
$this->parse_exec_vars === TRUE)
 {
 
$memory round(memory_get_usage() / 1024 10242).'MB';
 
$output str_replace(array('{elapsed_time}''{memory_usage}'), array($elapsed$memory), $output);
 } 

Should that not be swapped?

First replace the pseudo-variables with the data
Then write the cache?

Regards,
Martin

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>