bertramdev / asset-pipeline

The core implementation of the asset pipeline for the jvm
193 stars 91 forks source link

Improved hashing of assets #248

Closed brischniz closed 4 years ago

brischniz commented 4 years ago

We discovered that sometimes under certain circumstances an invalid object was stored in the cache (possibly a File.exists() returned a false due to high load despite the presence of the file), which then led to NullPointerExceptions and empty assets. Furthermore, this invalid object did not disappear from the cache.

This PR improves the AssetHelper.getByteDigest(byte[] fileBytes) method to make the hashing algorithm and an additional salt configurable.