File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,10 @@ def initialize(opts = {})
5353 @prefix = opts [ :prefix ] || RedisFeatureStore . default_prefix
5454 @logger = opts [ :logger ] || Config . default_logger
5555
56- @expiration_seconds = opts [ :expiration ] || 15
57- @capacity = opts [ :capacity ] || 1000
58- # We're using Moneta only to provide expiration behavior for the in-memory cache.
59- # Moneta can also be used as a wrapper for Redis, but it doesn't support the Redis
60- # hash operations that we use.
61- if @expiration_seconds > 0
62- @cache = ExpiringCache . new ( @capacity , @expiration_seconds )
56+ expiration_seconds = opts [ :expiration ] || 15
57+ capacity = opts [ :capacity ] || 1000
58+ if expiration_seconds > 0
59+ @cache = ExpiringCache . new ( capacity , expiration_seconds )
6360 else
6461 @cache = nil
6562 end
You can’t perform that action at this time.
0 commit comments