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

Conversation

Projects
None yet
2 participants
@camallen
Contributor

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'

This comment has been minimized.

@camallen

camallen Jan 6, 2017

Contributor

happy to remove this if it's not used widely

camallen added some commits Jan 6, 2017

@jnunemaker jnunemaker merged commit 2100398 into jnunemaker:master Jan 7, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@camallen camallen deleted the camallen:redis_cache_adapter branch Jan 11, 2017

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