Phil Sturgeon’s Template Library and Codeigniter Caching |
[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!
[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: /**
[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
[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?
[eluser]InsiteFX[/eluser]
If it has that line then yes I would say it's using ci caching! InsiteFX
[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 |
Welcome Guest, Not a member yet? Register Sign In |