Pull requests

#7 Merged
Repository
javex
Branch
master
Repository
zzzeek
Branch
master

Add a SQLAlchemy recipe for refreshing the cache

Author
  1. javex
Reviewers
Description

I found myself with the problem that I wanted to refresh a cache in the background when I change my SQLAlchemy powered database. I only found ways to use refresh (which delays the client adding/changing data) or invalidate (which delays the client fetching the data). If I wanted to make a seamless transition without anyone having to wait, I'd need a new thread that is spawned right after the session is committed.

I have tested my recipe locally and it works. However, please review if there is a better way (for example it is tailored to cache_on_arguments, there may be a better, more general way).

  • Learn about pull requests

Comments (1)