jack icon indicating copy to clipboard operation
jack copied to clipboard

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

Open takashiyonebayashi opened this issue 13 years ago • 4 comments

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.

takashiyonebayashi avatar Oct 11 '11 19:10 takashiyonebayashi

How does the Ruby side handle this?

bryanduxbury avatar Oct 11 '11 22:10 bryanduxbury

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 < [email protected]>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

takashiyonebayashi avatar Oct 11 '11 22:10 takashiyonebayashi

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

On Tue, Oct 11, 2011 at 3:39 PM, Takashi Yonebayashi < [email protected]>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 < [email protected]>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

bryanduxbury avatar Oct 11 '11 22:10 bryanduxbury

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

On Tue, Oct 11, 2011 at 3:41 PM, Bryan Duxbury < [email protected]>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 < [email protected]>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 < [email protected]>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

takashiyonebayashi avatar Oct 11 '11 22:10 takashiyonebayashi