Welcome Guest, Not a member yet? Register   Sign In
Codeigniter - cache only part of the view
#1
Question 

In my CI application I use to load differents parts of the view:

Code:
$data['header'] = $this->load->view('header', $data, true);

$data['footer'] = $this->load->view('footer', $data, true);

$data['user'] = $this->load->view('menu_user', $data, true);

$this->load->view('home_page',$data);

I would like to use the cache system:

$this->output->cache(60); // Will expire in 60 minutes
but the "menu user" for example, verifies every time if the user is logged or no. It doesn't need to be cached.

Is there a way for cache only some "part" of the page?
Reply


Messages In This Thread
Codeigniter - cache only part of the view - by henry_miaomiao - 12-12-2015, 07:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB