Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache invalidation problem #261

Open
rlander opened this issue Sep 22, 2016 · 0 comments
Open

Cache invalidation problem #261

rlander opened this issue Sep 22, 2016 · 0 comments

Comments

@rlander
Copy link

rlander commented Sep 22, 2016

Suppose you have a Greeting model with [id, text] and you want to list all available greetings.

5> boss_db:find(greeting, []).
[{greeting,"greeting-8",<<"Hello">>}, {greeting,"greeting-9",<<"Foo">>}]

You have caching enabled and update a Greeting field like so:

6> Greeting = boss_db:find("greeting-9").
(Greeting:set(text, "Bar")):save().
{ok,{greeting,"greeting-9","Bar"}}
7> boss_db:find(greeting, []).
[{greeting,"greeting-8",<<"Hello">>}, {greeting,"greeting-9",<<"Foo">>}]

The cache for the first query should be invalidated but it won't. #260 fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant