#10 Declined
Repository
kris_b/johnny-cache-old johnny-cache-old
Branch
default
Repository
jmoiron/johnny-cache johnny-cache
Branch
default

Savepoints and localstore

Author
  1. Krzysztof Bandurski avatarKrzysztof Bandurski
Reviewers
Description

Hi there,

I just spend about 3 days (not complaining here!) trying to fix a weird bug that resulted in cache not being updated for a table upon saving a model. I am no expert on database transactions and savepoints, but it seems that it was caused by the way johnny handles these.

Here's how I fixed it. I am not sure if it's correct, but it sure did fix my problem :)

I included a little test for it in a new file (tests/transaction.py).

Please let me know if my thinking on this is correct when you have a spare moment.

Cheers,

Kris

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.