Output caching using APC |
[eluser]Patrick Savalle[/eluser]
Most serious installations have APC enabled. When using APC you can use it for output caching also. Just place this class in application/core/MY_Ouput.php and your output caching will use APC, avoiding disk-writes and reads. As a bonus this version also saves the HTTP header with the cache. Code: <?php
[eluser]bd3521[/eluser]
No comments? This is a great solution!! Could you improve this to fail back to default CI file caching if APC is not present?
[eluser]Patrick Savalle[/eluser]
Thats very easy ![]() ![]() I do have an improved 'default' cache for you. http://ellislab.com/forums/viewthread/215823/ I don't know if this already made it to a newer release.
[eluser]bd3521[/eluser]
Improper server config, moving it to another webserver w/o apc, APC craps outs, etc... It was just a way to make sure it runs well under different environments. I'll just toss in if ($this->cache->apc->is_supported())
[eluser]Patrick Savalle[/eluser]
Code: <?php |
Welcome Guest, Not a member yet? Register Sign In |