Currently we invalidate cache before doing DB updates, and it's bad.
we get an “edit category info” request
we invalidate cache for the category list
...meanwhile, someone requests the main page; the old category list is rendered and put into cache again
we do DB updates
now DB and cache aren't coherent
Luckily, Selenium is fast enough to catch it.
The right solution, I think, is to use something that would allow transactions to work both on permanent and in-memory storage. I can hack acid-state to do that, but I'd rather not fork acid-state, really.
Currently we invalidate cache before doing DB updates, and it's bad.
Luckily, Selenium is fast enough to catch it.
The right solution, I think, is to use something that would allow transactions to work both on permanent and in-memory storage. I can hack acid-state to do that, but I'd rather not fork acid-state, really.