cache() public méthode

Set Cache
public cache ( integer $time ) : CI_Output
$time integer Cache expiration time in minutes
Résultat CI_Output
 public function cache($minute)
 {
     if (ENVIRONMENT == 'development') {
         return;
     }
     require_once APPPATH . 'hooks/cache_override.php';
     parent::cache($minute);
     $offset = $minute * 60;
     // calc the string in GMT not localtime and add the offset
     $this->set_header('Expires: ' . gmdate('D, d M Y H:i:s \\G\\M\\T', time() + $offset));
     $this->set_header('Cache-Control: max-age=' . $offset);
     header_remove('Pragma');
     $this->cacheable();
     $this->cache_instance = new Cache_Override();
     $this->cache_instance->lock();
 }