Skip to content

Commit

Permalink
Avoid unnecessary string building
Browse files Browse the repository at this point in the history
  • Loading branch information
qwtel committed May 24, 2020
1 parent cae8abb commit 38d3de7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/jekyll-include-cache/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def key(path, params)
end

def digest(path_hash, params_hash)
Digest::MD5.hexdigest("#{path_hash}#{params_hash}")
md5 = Digest::MD5.new
md5.update path_hash.to_s
md5.update params_hash.to_s
md5.hexdigest
end
end
end

0 comments on commit 38d3de7

Please sign in to comment.