• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.