How to cache output? |
[eluser]Computerzworld[/eluser]
Hello, I want to cache my output using Code: $this->output->cache(n)
[eluser]pistolPete[/eluser]
[quote author="Computerzworld" date="1235498703"]Actually I want to cache the menu in the header which is a view file. [/quote] CI's standard cache can only handle the caching of full pages. Have a look at e.g. the following about partial caching: - http://ellislab.com/forums/viewthread/104228/ - http://codeigniter.com/wiki/MP_Cache:_Si...s_of_code/
[eluser]CrossMotion[/eluser]
What you want is Fragment Caching. I had this problem with a project a while ago, I found the following very useful: http://codeigniter.com/wiki/MP_Cache:_Si...s_of_code/
[eluser]Computerzworld[/eluser]
thanks for the reply... how can i cache full page & load it from cache?
[eluser]TheFuzzy0ne[/eluser]
The [url="http://ellislab.com/codeigniter/user-guide/general/caching.html"]CodeIgniter cache method[/url] in the Output class does it all for you. |
Welcome Guest, Not a member yet? Register Sign In |