CI's db->cache_on() and Fuel models

edited November 2012 in Feature Requests
Hello there,

I'd like to ask how exactly the config option found in application/config/database.php
'cache_on'
affects the DB queries resulting from my advanced modules' models. I've set it to TRUE but when i turn on the profiler i see no difference at all to the execution time nor to the actual queries being made to the DB.

Basically, is there anything else I should do to make use of CI's db->cache_on() method as described here http://codeigniter.com/user_guide/database/caching.html ?

Or in general, what's the best strategy to cache DB connections when using the builtin find_all method on my models?

Comments

  • edited 9:37AM
    The caching part still should work as intended. However, it appears that because FUEL modifies the drivers a little, the serialized object it uses (CI_DB_result), it doesn't have all the methods on it that FUEL has extended.

    I'm looking into that issue.
  • edited 9:37AM
    After spending some time on this, I've looked into the stock Blog module and basically implemented a get_cache() / save_cache() combo just as the one featured in the Fuel_blog library.

    That works pretty well indeed, all I need. Thanks anyway!
Sign In or Register to comment.