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

Support skip nil for cache fetch #25437

Merged
merged 5 commits into from Aug 5, 2018

Conversation

Projects
None yet
5 participants
@Martin91
Copy link
Contributor

Martin91 commented Jun 19, 2016

Summary

Provide a skip_nil setting for cache store. According to our cases, we need to cache some results retrieved from external services with 1 day expiration time, but if they are down with some accidental reasons, nil result will be cached whole day, instead, we hope not to cache that result, so we can always retry retrieving and it can cache expected result again once the services come back normal.

I have added one more spec for this setting and it ensures not to break existed behaviours, I also updated the documentation for #fetch method.

@rails-bot

This comment has been minimized.

Copy link

rails-bot commented Jun 19, 2016

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @sgrif (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Martin91

This comment has been minimized.

Copy link
Contributor Author

Martin91 commented Jun 19, 2016

@sgrif @maclover7 I saw some build failures in ci but I think they are not related to my PR, should I pay attention to or am responsible for them?
image

@maclover7

This comment has been minimized.

Copy link
Member

maclover7 commented Jun 19, 2016

@Martin91 nope, master is failing right now. will be green again once #25436 is merged in.

@Martin91

This comment has been minimized.

Copy link
Contributor Author

Martin91 commented Jun 21, 2016

Ok, glad to sound that
Jon Moss notifications@github.com于2016年6月20日 周一上午4:47写道:

@Martin91 https://github.com/Martin91 nope, master is failing right
now. will be green again once #25436
#25436 is merged in.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#25437 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ACxCpKLXM2gFzZjwftWLAEcHVl6VWvGIks5qNar6gaJpZM4I5GPQ
.

@Martin91

This comment has been minimized.

Copy link
Contributor Author

Martin91 commented Mar 16, 2017

I wonder if anyone has any opinion on this PR?

@schneems

This comment has been minimized.

Copy link
Member

schneems commented Jul 22, 2018

This seems fine. Can you fix the conflicts?

@Martin91

This comment has been minimized.

Copy link
Contributor Author

Martin91 commented Jul 23, 2018

@schneems Sure.

@Martin91 Martin91 force-pushed the Martin91:support-skip-nil-for-cache-fetch branch 3 times, most recently Jul 23, 2018

@Martin91

This comment has been minimized.

Copy link
Contributor Author

Martin91 commented Jul 23, 2018

@schneems I have rebased the branch and resolved the conflicts.

@schneems

This comment has been minimized.

Copy link
Member

schneems commented Jul 23, 2018

Tests are failing, can you take a look. Also I’ll need a change log entry for this.

We are getting close, thanks for your work here!

@Martin91 Martin91 force-pushed the Martin91:support-skip-nil-for-cache-fetch branch to 4bb7e63 Aug 5, 2018

@Martin91

This comment has been minimized.

Copy link
Contributor Author

Martin91 commented Aug 5, 2018

@schneems I have added a change log entry and it seems that all tests have passed.

@schneems

This comment has been minimized.

Copy link
Member

schneems commented Aug 5, 2018

Thanks!

@schneems schneems merged commit 47018a8 into rails:master Aug 5, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.