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

Modifications of objects is reflected in the cache, but not in the persistence #31

Open
takashiyonebayashi opened this issue Oct 11, 2011 · 4 comments

Comments

@takashiyonebayashi
Copy link
Contributor

If an object is returned and is present in the cache, any changes to that object without a call to save are reflected in the cache, but not in the underlying persistence.

It should be decided what the desired behavior is.

@bryanduxbury
Copy link
Contributor

How does the Ruby side handle this?

@takashiyonebayashi
Copy link
Contributor Author

Doesn't ruby make the change when you change the model? If we want to
mirror that, every set and get call would perform a database update.

On Tue, Oct 11, 2011 at 3:37 PM, Bryan Duxbury <
reply@reply.github.com>wrote:

How does the Ruby side handle this?

Reply to this email directly or view it on GitHub:
https://github.com/bryanduxbury/jack/issues/31#issuecomment-2372213

@bryanduxbury
Copy link
Contributor

No, ActiveRecord requires you to call save to persist stuff to the database.

On Tue, Oct 11, 2011 at 3:39 PM, Takashi Yonebayashi <
reply@reply.github.com>wrote:

Doesn't ruby make the change when you change the model? If we want to
mirror that, every set and get call would perform a database update.

On Tue, Oct 11, 2011 at 3:37 PM, Bryan Duxbury <
reply@reply.github.com>wrote:

How does the Ruby side handle this?

Reply to this email directly or view it on GitHub:
https://github.com/bryanduxbury/jack/issues/31#issuecomment-2372213

Reply to this email directly or view it on GitHub:
https://github.com/bryanduxbury/jack/issues/31#issuecomment-2372249

@takashiyonebayashi
Copy link
Contributor Author

I'm not sure how active record does it. Maybe check with Sean?

On Tue, Oct 11, 2011 at 3:41 PM, Bryan Duxbury <
reply@reply.github.com>wrote:

No, ActiveRecord requires you to call save to persist stuff to the
database.

On Tue, Oct 11, 2011 at 3:39 PM, Takashi Yonebayashi <
reply@reply.github.com>wrote:

Doesn't ruby make the change when you change the model? If we want to
mirror that, every set and get call would perform a database update.

On Tue, Oct 11, 2011 at 3:37 PM, Bryan Duxbury <
reply@reply.github.com>wrote:

How does the Ruby side handle this?

Reply to this email directly or view it on GitHub:
https://github.com/bryanduxbury/jack/issues/31#issuecomment-2372213

Reply to this email directly or view it on GitHub:
https://github.com/bryanduxbury/jack/issues/31#issuecomment-2372249

Reply to this email directly or view it on GitHub:
https://github.com/bryanduxbury/jack/issues/31#issuecomment-2372266

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

2 participants