Phil Sturgeon’s Template Library and Codeigniter Caching - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Phil Sturgeon’s Template Library and Codeigniter Caching (/showthread.php?tid=32410) |
Phil Sturgeon’s Template Library and Codeigniter Caching - El Forum - 07-22-2010 [eluser]Aidy[/eluser] I'm trying to get Phil's Template Library to work with Codeigniter caching. I thought I might be able to just output the template build as a string then load up a view with the string passed in the data array. Code: $this->output->cache(42000); Caching does not seem to work with this approach. I've had a look at the template class and can't find anything that I think would effect the caching but some of the code there is probably a bit beyond me. Can anyone tell me why it won't work? Thanks! Phil Sturgeon’s Template Library and Codeigniter Caching - El Forum - 04-02-2011 [eluser]seonet[/eluser] [quote author="Aidy" date="1279830062"]I'm trying to get Phil's Template Library to work with Codeigniter caching. I thought I might be able to just output the template build as a string then load up a view with the string passed in the data array. Code: $this->output->cache(42000); Caching does not seem to work with this approach. I've had a look at the template class and can't find anything that I think would effect the caching but some of the code there is probably a bit beyond me. Can anyone tell me why it won't work? Thanks![/quote] Read the Phil's code. Code: /** Phil Sturgeon’s Template Library and Codeigniter Caching - El Forum - 04-02-2011 [eluser]InsiteFX[/eluser] I think you will find that the Template Library is using Phil's own Caching Library! Phil's - CodeIgniter Cache Library InsiteFX Phil Sturgeon’s Template Library and Codeigniter Caching - El Forum - 04-02-2011 [eluser]seonet[/eluser] [quote author="InsiteFX" date="1301821767"]I think you will find that the Template Library is using Phil's own Caching Library! Phil's - CodeIgniter Cache Library InsiteFX[/quote] I see it is using CI output cache because: Code: /* Line 241, 242 */ May be I am wrong? Phil Sturgeon’s Template Library and Codeigniter Caching - El Forum - 04-02-2011 [eluser]InsiteFX[/eluser] If it has that line then yes I would say it's using ci caching! InsiteFX Phil Sturgeon’s Template Library and Codeigniter Caching - El Forum - 04-04-2011 [eluser]Aidy[/eluser] Thanks a lot for the answers. At the time of writing this post (it was some months ago) I don't think the library had a set_cache method, but I figured it out and added one |