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

orm update has cache #626

Closed
lonso opened this issue Mar 31, 2015 · 8 comments
Closed

orm update has cache #626

lonso opened this issue Mar 31, 2015 · 8 comments

Comments

@lonso
Copy link

lonso commented Mar 31, 2015

when i update model, i change data on mysql command line.
But i orm2,the data not change need i use
orm.singleton.clear();
that data will be change.
why?

@newradius
Copy link

I had the same problem and I lost like 2 hours so I disabled the cache globally.
db.settings.set('instance.cache', false);

@dxg
Copy link
Collaborator

dxg commented May 25, 2015

The cache isn't really a cache, but a singleton pattern.
Did you update the model via ORM calls or SQL?

I too disabled it globally.

@newradius
Copy link

I update via ORM calls.

@dxg
Copy link
Collaborator

dxg commented May 26, 2015

Can you provide a limited code sample? Like the one here.

@newradius
Copy link

If i try to update the same object, it only updates 1 time. Let's say I want to update an UserRole I retrieve the user with .get and update it but if I want to update it againt the UserRole doesn't update the 2nd time.

@dxg
Copy link
Collaborator

dxg commented May 28, 2015

If you provide a code sample or even better, a failing test case, then I may be able to do something with it.

@Sebush
Copy link

Sebush commented Aug 19, 2015

cache and cluster... how can i purge the "cache" in cluster-express-configuration? my solution at the moment is to disable orm-cache

@dxg
Copy link
Collaborator

dxg commented Aug 20, 2015

Orm cache isn't a cache at all, but an identity map. I don't see anything wrong with disabling it.

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

4 participants