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

Add redis cache adapter #211

Merged
merged 14 commits into from Jan 7, 2017
Merged

Conversation

camallen
Copy link
Contributor

@camallen camallen commented Jan 6, 2017

closes #142 - first attempt at adding a redis cache adapter. I've added some testing setup that was broken and documented running them via docker-compose.

I mimicked the dalli cache adapter almost entirely, i think the only choices i had to make were is this included in the flipper-redis gem and how to use the setex cmd (ttl) with redis. I chose yes and to marshal objects when storing / retrieving, limited testing on this show the features serializing in and out of redis ok. Happy to change the implementation if you want.

Side note: when testing in the pry debugger, the inspect method on a feature would call the adapter.gethere and warm the cache which took me a while to figure out. Maybe i should just make a note of this in the readme / wiki...?

@@ -6,6 +6,7 @@

require 'rubygems'
require 'bundler'
require 'pry'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happy to remove this if it's not used widely

@jnunemaker jnunemaker merged commit 2100398 into flippercloud:master Jan 7, 2017
@camallen camallen deleted the redis_cache_adapter branch January 11, 2017 09:30
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.

Redis cache adapter
2 participants