![]() |
Disable Caching & Internal Error Level Setting - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Disable Caching & Internal Error Level Setting (/showthread.php?tid=23399) |
Disable Caching & Internal Error Level Setting - El Forum - 10-09-2009 [eluser]Gregory Kornblum[/eluser] I apologize if these have come up before (as I think they would) however I have not been able to find anything via search or docs. Is there a standard method to disable CI's own file level caching? Right now I just set the permissions so nothing can be written to its folder but obvious;y that is far from an elegant solution. Secondly I would like to keep any error level aspects within php.ini. So of course, what I did was make changes to index.php. However I do not want to mess with CI too much for when I do upgrades to CI. I doubt it but is there anything without touching system files or index.php? I'm more interested in the caching thing but if anyone has something on the error aspects I mentioned I would love to hear anything anyone has to say about that. I am making heavy use of memory based caching so the file level stuff in CI is rather redundant and gets in the way during development. I have extended the controller and in its constructor I set the cache seconds to 0 but all pages are still caching. I wanted to do this to avoid having to rewrite the same line of code in every controller as I try to stick with the DRY concept as much as possible. Thank you in advance for any info you may provide. Disable Caching & Internal Error Level Setting - El Forum - 10-09-2009 [eluser]Gregory Kornblum[/eluser] Found a more elegant method to disable cache. I simply made an Output.php library override (MY_Output.php) and changed the cache function to the following: function cache($time) { $this->cache_expiration = 0; //Overidden so we don't have to call it in each controller '( ! is_numeric($time)) ? 0 : $time; } |