Just wanted to know if anyone has experience with the new query caching in 1.1.7 and its compatibility with prepared statements. It appears that if I cache a query with placeholders, it caches any query using those placeholders, regardless of whether or not I bind different values to the query.
Does anyone know if there’s a way around this?
Also, with regards to caching ActiveRecords (which works much better), I have a large relational model structure setup, which I want to cache, but I’m not sure what $queryCount parameter to set. This is because my related models also have relations.
Example:
lecture has multiple meetings
lecture has multiple sections
section has multiple meetings
I want to find all lectures (and corresponding meetings) with my model, so I would use:
That only caches the initial fetch of the lecture. I understand there’s the $queryCount parameter, but I’m not sure if the lecture will have any sections. So, if I set the queryCount to 3, and the lecture has no sections, it will only execute two queries thus meaning that the next query I execute might be cached (which I don’t want).
Any ideas?
Side note - I keep creating duplicate posts because the forums are giving me an SQL error after approximately a 20 second timeout or so when pressing the post button, bringing me back to the edit page. Just a heads up to whoever manages.