Hooks and Cache |
[eluser]seantaylor[/eluser]
I call a function inside the parent controller so it executes no matter what function is called for that controller. However, when I enable caching for a function (i.e. index) the function inside the parent controller is bypassed when that page is viewed. I assume I can still call a function using hooks but I was wondering at what stage to make such a call (i.e. pre_controller & post_controller).
[eluser]WebsiteDuck[/eluser]
I think using a pre_controller hook would work, but it sounds like it might be something you could use the controller's constructor for? http://ellislab.com/codeigniter/user-gui...nstructors Edit: Nevermind I see what you mean, I would try pre_controller or maybe doing something with cache_override
[eluser]seantaylor[/eluser]
Thanks for the advice. I will try this solution and post results.
[eluser]tomcode[/eluser]
I guess You need to use a pre_system hook, it's the only hook called before the cache file check. 1.7.2: file system/codeigniter/CodeIgniter.php line 89 - 114 |
Welcome Guest, Not a member yet? Register Sign In |