You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I have two files child.html and parent.html and the child.html file is referenced in the parent.html file. Now I run cache bust on those files and they both get renamed to some filenames child.{a}.html and parent.{b}.html (with a and b as the hash values).
If I now change the child.html and run cache bust again, only the child file will get the new filename child.{a'}.html. The parent file will remain with it's old filename parent.{b}.html.
I would expect the filename of the parent to change as well.
When using angular's ng-include feature (see my example). The parent.html file is requested first, which will in turn request child.html. A client who has both files cached will not receive the change in the child.html file, because the parent.html file did not change.
To resolve this issue, the plugin could create a tree structure for the dependencies in the files and cache bust the tree from the leaves to the root. Loops in the tree may occur (a references b and b references a), but could easily be resolved by choosing a random node as the root (cache bust b -> replace filename in a -> cache bust a -> replace filename in b).
The text was updated successfully, but these errors were encountered:
Let's say I have two files
child.html
andparent.html
and thechild.html
file is referenced in theparent.html
file. Now I run cache bust on those files and they both get renamed to some filenameschild.{a}.html
andparent.{b}.html
(with a and b as the hash values).If I now change the
child.html
and run cache bust again, only the child file will get the new filenamechild.{a'}.html
. The parent file will remain with it's old filenameparent.{b}.html
.I prepared a small example: https://github.com/BastianHofmann/grunt-cachebust-test (just to npm install and run grunt, you can use the
change
branch to change the child.html file)I would expect the filename of the parent to change as well.
When using angular's ng-include feature (see my example). The parent.html file is requested first, which will in turn request child.html. A client who has both files cached will not receive the change in the child.html file, because the parent.html file did not change.
To resolve this issue, the plugin could create a tree structure for the dependencies in the files and cache bust the tree from the leaves to the root. Loops in the tree may occur (a references b and b references a), but could easily be resolved by choosing a random node as the root (cache bust b -> replace filename in a -> cache bust a -> replace filename in b).
The text was updated successfully, but these errors were encountered: