preface - looking for a fix and will pop a pull request if i can nail down whats going on, but thought best to post in case anyone else had come across or had a better working knowledge of cfstatic and could pin it down quicker.
Issue - I have two directories assets\css\core and assets\js\core that both contain lots of files that are set to minify & concatenate down to one file that has been working like a dream forever. Since upgrading to CF 2021 (seems compatible otherwise) it seems on the first load of the application everything works fine, but on the second page load the hash for the JS file gets set to the same as the hash for the CSS file.
e.g output initial load ( hashes 20220826055440 & 20220831091516 )
<link rel="stylesheet" href="https://[domain]/assets/static/core.min.20220826055440.css" media="all" charset="utf-8">
<script type="text/javascript" src="https://[domain]/assets/static/core.min.20220831091516.js" charset="utf-8"></script>
second load ( single hash 20220826055440 )
<link rel="stylesheet" href="https://[domain]/assets/static/core.min.20220826055440.css" media="all" charset="utf-8">
<script type="text/javascript" src="https://[domain]/assets/static/core.min.20220826055440.js" charset="utf-8"></script>
This only seems to happen on the development and staging environments where we set the checkForUpdates parameter to true
initialisation:
<cfset application.cfstatic = new shared.lib.cfstatic.CfStatic(
staticDirectory = application.root_path & "assets",
staticUrl = application.basehref & "/assets",
outputDirectory = "static",
includeAllByDefault = false,
forceCompilation = true,
checkForUpdates = application.cfstatic_check_for_update,
debugAllowed = true,
debugKey = key,
debugPassword = pass
)>
Other setup details - Windows / CF 2021 Enterprise
preface - looking for a fix and will pop a pull request if i can nail down whats going on, but thought best to post in case anyone else had come across or had a better working knowledge of cfstatic and could pin it down quicker.
Issue - I have two directories
assets\css\coreandassets\js\corethat both contain lots of files that are set to minify & concatenate down to one file that has been working like a dream forever. Since upgrading to CF 2021 (seems compatible otherwise) it seems on the first load of the application everything works fine, but on the second page load the hash for the JS file gets set to the same as the hash for the CSS file.e.g output initial load ( hashes 20220826055440 & 20220831091516 )
second load ( single hash 20220826055440 )
This only seems to happen on the development and staging environments where we set the
checkForUpdatesparameter totrueinitialisation:
Other setup details - Windows / CF 2021 Enterprise