![]() |
Custom Cache Library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Custom Cache Library (/showthread.php?tid=29809) |
Custom Cache Library - El Forum - 04-21-2010 [eluser]Braden Schaeffer[/eluser] For those of you who ever wanted to cache more than just queries or views, I made a custom cache library for myself that I decided to share with you guys. You can find the git repo here: http://bitbucket.org/bschaeffer/ci-cache There's a sample controller in the repo for a usage example. Custom Cache Library - El Forum - 04-22-2010 [eluser]ralf57[/eluser] Sounds great, but how it's different from Phil Sturgeon's Cache library? http://github.com/philsturgeon/codeigniter-cache Anyway, nice contribution Custom Cache Library - El Forum - 04-22-2010 [eluser]Braden Schaeffer[/eluser] @ralf57 Um.... didn't know about that library. It looks like mine is a little bit simpler. Phil's library has apparently implemented data retrieval methods within the class, while mine is more straight forward: Here's an example: Code: <?php I guess you can imagine caching any function that returns data in a fairly simple way. Cache whatever you want... you know? Also.. I haven't added a delete method yet. ![]() His library looks pretty nifty though... might have to take a look at it. |