Custom Cache Library |
[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.
[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
[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. |
Welcome Guest, Not a member yet? Register Sign In |