I am doing agressive caching and I'd like to make sure that nobody accidentally writes code that updates the database directly. I would imagine that the way to solve this would be to rename the normal object manager .rw_objects
for the caches use, and replace .objects
with a manager that logs a warning on a non-updating access and throws an exception if someone tries to do an update from it.
I've written an object manager and a query set but I'm not sure how to go about checking whether a query is updating the database.
Any suggestions?