How to prevent view cache in one controller method?
I have a view that uses some frequently updated data from a remote source, in fact the updates could be arbitrary. The view is being cached though, & I'd like to turn off cacheing (but keep the assets cached). Is this possible?
Comments
Does Fuel augment Codeigniter's cache behaviour in these situations?
http://docs.getfuelcms.com/libraries/fuel_cache
// try cache $cache_id = 'mycache'; if(!$data = $this->fuel->cache->get($cache_id)) { $this->load->model('data_model'); $data = $this->data_model->find_all_array(NULL, 'last_modified DESC'); $this->fuel->cache->save($cache_id, $data, NULL, 3600); } // ....use the $data as intended
But there is no "exclude from cache" in its methods? Ultimately I used this:
$this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); $this->output->set_header('Pragma: no-cache'); $this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");