简体   繁体   中英

How to “cache bust” html files in Grails/asset pipeline with angular js

We are using Grails with Angular Js.

In my understanding, the Asset pipeline plugin already handles the cache busting on the js and css files. I noticed my js and css files, have a hash appended to them. Which changes once we deploy changes to those areas.

Our html files does not have the hash though. So we have to clear cache and refresh every time we deploy new changes.

We are trying to avoid the manual versioning of the html files, so we are hoping if there is a config for asset pipeline that handles this?

Or maybe a config in angular we can use for this?

This is not so much an answer to your question, rather a better solution for the task at hand.

I recommend using the angular-template-asset-pipeline plugin that will add your html templates to the Angular template cache, therefore a request to retrieve them will no longer occur.

https://github.com/craigburke/angular-template-asset-pipeline

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