Skip to content

Commit

Permalink
Merge pull request #109 from cmd-ntrf/lru_digest_fix
Browse files Browse the repository at this point in the history
Make Digest subclass lookup thread-safe in lru_cache
  • Loading branch information
malikparvez authored Sep 25, 2023
2 parents cf0b3fc + 4e9cb06 commit a6b95f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet_forge/lru_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LruCache
# a convenience method for generating cache keys. Cache keys do not
# have to be SHA256 hashes, but they must be unique.
def self.new_key(*string_args)
Digest::SHA256.hexdigest(string_args.map(&:to_s).join(':'))
Digest(:SHA256).hexdigest(string_args.map(&:to_s).join(':'))
end

# @return [Integer] the maximum number of items to cache.
Expand Down

0 comments on commit a6b95f4

Please sign in to comment.