Add a SQLAlchemy recipe for refreshing the cache

Merged
#7 · Created  · Last updated

Merged pull request

Merged in javex/dogpile.cache (pull request #7)

e4c8e36·Author: ·Closed by: ·2014-06-13

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).

0 attachments

0 comments

Loading commits...