I am developing an EE module which uses custom sql tables.
Currently, the EE 2.1 setup I am using has sql query caching enabled - I spend a few hours trying to work out why my select queries were giving blatantly wrong results. The current behaviour seems to cache queries indefinitely, so even if I run an update statement then come back 10 minutes later, and run a select, I still get incorrect results.
I don’t want to just disable caching on my local install, because we want to release this module, and other users may have caching enabled, so will run into problems further down the line.
Also, I notice the latest build of 2.1.0 has sql query caching ‘temporarily disabled’.
So my question is: is the behaviour I am seeing actually a bug, i.e. in future versions will the cache be automatically flushed when I call insert/update/delete? OR should I code around that, and always call $this->db->cache_delete() in my models after making an insert/update/delete?
Note: I am using active record syntax wherever possible, if that makes any difference to the behaviour.
Thanks for any help/guidelines 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.