Hi, buildVersionHash has a comment (and historically do this):
Walks the directory tree, finding files, generating a version hash
But from v.3.0.1, the code responsible for the hash creation (cachedMakeHash) is called from getVersionedPath. So, the comment is outdated but most important, the whole concept of
When you initialize this module, it crawls your public folder synchronously at startup, and pre-determines all the MD5 hashes for your static files. This slows down application startup slightly, but it keeps the runtime performance at its peak.
Now, the hash is generated only if the resource is called and make slow the first call of it.
I think that, or you change your code to match the documentation (and how historically works) or you change the description/comment.
Let me know what you think.
Hi, buildVersionHash has a comment (and historically do this):
But from v.3.0.1, the code responsible for the hash creation (cachedMakeHash) is called from getVersionedPath. So, the comment is outdated but most important, the whole concept of
Now, the hash is generated only if the resource is called and make slow the first call of it.
I think that, or you change your code to match the documentation (and how historically works) or you change the description/comment.
Let me know what you think.