简体   繁体   中英

Bundle cache-busters on a web server farm

The ASP.NET Bundling and Minification tutorial states:

The query string v has a value token that is a unique identifier used for caching. As long as the bundle doesn't change, the ASP.NET application will request the AllMyScripts bundle using this token. If any file in the bundle changes, the ASP.NET optimization framework will generate a new token, guaranteeing that browser requests for the bundle will get the latest bundle.

How does this work on a web server farm?

If I update a javascript file included in a bundle, will the new query string be the same across my web farm?

The v query string is just a hash of the contents of that bundle. If the same set of Javascript files are deployed to all servers in your farm, the hash should be the same, resulting in a the same v value on all servers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM