Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.

Commit 5afdc0e

Browse files
sinneduyJackDanger
authored andcommitted
only one network call
1 parent 1e14f48 commit 5afdc0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/gemstash/cache.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def alive!
9393
end
9494

9595
def get(key)
96-
YAML.load(@cache.get(key)) unless @cache.get(key).nil?
96+
val = @cache.get(key)
97+
YAML.load(val) unless val.nil?
9798
end
9899

99100
def get_multi(keys)

0 commit comments

Comments
 (0)