Skip to content

Commit 072217d

Browse files
committed
rm unnecessary instance vars and obsolete comment
1 parent 2ce4971 commit 072217d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/ldclient-rb/redis_store.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)