-
Notifications
You must be signed in to change notification settings - Fork 82
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
Conversation
@@ -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). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm... true. Suggestions?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InMemoryTtl?
closing, as this is not quite the right approach |
Sorry. I accidentally closed this. |
(v6 - #11) factor out application startup code
No description provided.