-
Notifications
You must be signed in to change notification settings - Fork 174
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
Support deferred expiration of records and attributes for one-to-many associations #577
Conversation
nice looking pretty good so far... Why did you need to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really excited to see this feature coming along!
80d2148
to
7595790
Compare
if Thread.current[:idc_deferred_parent_expiration] | ||
Thread.current[:idc_parent_records_for_cache_expiry] << parent | ||
next parent | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parent.expire_primary_index
underlying calls the primary_index.expire
, so we have an if block in the primary_index.expire
, we don't need separate Set
here. Just make the parent and associated records in one Set
, and call write_multi
to the keys. It will make the code simpler and easier to understand.
delete_multi
/write_multi
) instead of expire each record in a loopidentity_cache_test
in Mysql, achieved it by adding a Rake task