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

Already on GitHub? Sign in to your account

AO3-5134 Fix work caching issue #3172

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

hatal175 commented Nov 19, 2017

Issue

https://otwarchive.atlassian.net/browse/AO3-5134

Purpose

This fixes work caching issue where the author byline is not updated if you remove a co-author. Turns out the work cache_key is not updated if expire_caches is called so I added it. This seems to have solved an issue in private bookmarks where the count was not updated correctly.

I'd appreciate input on the change if possible.

Testing

Steps are described in bug report.

Credit

Tal Hayon

Please use he.

hatal175 added some commits Nov 19, 2017

AO3-5134 change unless destroyed to if persisted
This caching issue fix seems to have solved a problem in privacy bookmark feature test. I've changed the test appropriately
@@ -252,6 +252,10 @@ def expire_caches
Work.flush_find_by_url_cache unless imported_from_url.blank?
Work.expire_work_tag_groups_id(self.id)
+
+ if persisted?
+ self.touch
@houndci-bot

houndci-bot Nov 19, 2017

Redundant self detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment