Skip to content

RedisCacheAdapter: add some additional checks and defaults #2991

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

Merged
merged 1 commit into from
Nov 2, 2016

Conversation

TylerBrock
Copy link
Contributor

@TylerBrock TylerBrock commented Nov 2, 2016

This PR cleans up the comments a bit and makes the TTL for RedisCacheAdapter saner. It behaves like this:

  • If the ttl is not provided -> set key using DEFAULT_REDIS_TTL
  • If the ttl is provided and less than zero or NaN -> set key using DEFAULT_REDIS_TTL
  • If the ttl is provided and 0 -> do nothing
  • If the ttl is provided and Infinity -> set key permanently
  • If the ttl is provided, positive, and non-zero -> set key with provided ttl in milliseconds

@flovilmart
Copy link
Contributor

flovilmart commented Nov 2, 2016

@TylerBrock maybe remove dump.rdb from the commit :)

@TylerBrock TylerBrock force-pushed the spiff-up-redis-cache branch from 0d2101a to 633362a Compare November 2, 2016 22:01
@TylerBrock
Copy link
Contributor Author

DOH, thx

@facebook-github-bot
Copy link

@TylerBrock updated the pull request - view changes

@flovilmart
Copy link
Contributor

LGTM! Merge when you feel :)

@TylerBrock TylerBrock merged commit 801308d into parse-community:master Nov 2, 2016
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

Successfully merging this pull request may close these issues.

3 participants