Skip to content

Commit

Permalink
Fix memoization
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Oct 5, 2023
1 parent a5870cf commit 70318fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shakapacker/digest_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def generate_host_hash(*keys)

keys = [Rails.application.config.asset_host, ENV["SHAKAPACKER_ASSET_HOST"]] if keys.empty?

@generated_host_hashes[keys] = Digest::SHA1.hexdigest(keys.join("-"))
@generated_host_hashes[keys] ||= Digest::SHA1.hexdigest(keys.join("-"))
end
end
end

0 comments on commit 70318fd

Please sign in to comment.