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

Allow the in-memory cache TTL to be specified as a configuration parameter #11

Merged
merged 3 commits into from
Oct 25, 2016

Conversation

jkodumal
Copy link
Contributor

No description provided.

@@ -72,6 +73,8 @@ To set up LDR in this mode, provide a redis host and port, and supply a Redis ke
prefix = "ld:spree:test"
apiKey = "SPREE_TEST_API_KEY"

You can also configure an in-memory cache for the relay to use so that connections do not always hit redis. To do this, set the `ttl` parameter in your `redis` configuration section to a number (in milliseconds).
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should have the in-memory cache's default TTL be > 0. Anyone running LD-Relay for scale reasons will likely want it enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea-- addressed in latest commit.

@@ -47,6 +49,7 @@ type Config struct {
Redis struct {
Host string
Port int
Ttl *int
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if TTL here is misleading- it seems to suggest that this is the Redis TTL, not the in-memory cache's TTL..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmm... true. Suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

but if it is consistent with how it is named in the RedisFeatureStore we should either leave it or change it in both places

Copy link
Contributor

Choose a reason for hiding this comment

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

InMemoryTtl?

@drichelson
Copy link
Contributor

closing, as this is not quite the right approach

@drichelson drichelson closed this Oct 25, 2016
@drichelson drichelson reopened this Oct 25, 2016
@drichelson
Copy link
Contributor

Sorry. I accidentally closed this.

@jkodumal jkodumal merged commit 31b694d into master Oct 25, 2016
@jkodumal jkodumal deleted the jko/ttl branch October 25, 2016 22:39
atrakh added a commit that referenced this pull request Feb 9, 2018
LaunchDarklyCI pushed a commit that referenced this pull request Oct 7, 2020
(v6 - #11) factor out application startup code
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.

2 participants