Closed kwin closed 6 years ago
Another smaller related issue is that the input stream in https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/f7424effb1fd68e8d494988fe74c009b4ccab4bb/bundle/src/main/java/com/adobe/acs/commons/rewriter/impl/VersionedClientlibsTransformerFactory.java#L288 is not closed!
yikes. I thought that DigestUtils closed the stream, but it looks like it didn't. good catch.
In terms of the core issue, I would suggest that this is a product defect. please raise this with DayCare.
Created separate issue for the stream issue.
I further investigated and subsequently opened #1208.
Is there any ways we can induce MD5 change for css and js file
@irenebijo is there ?
Currently the MD5 calculation only happens in https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/f7424effb1fd68e8d494988fe74c009b4ccab4bb/bundle/src/main/java/com/adobe/acs/commons/rewriter/impl/VersionedClientlibsTransformerFactory.java#L278, in case the clientlib is not in the cache. The cache entries are itself only invalidated via https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/f7424effb1fd68e8d494988fe74c009b4ccab4bb/bundle/src/main/java/com/adobe/acs/commons/rewriter/impl/VersionedClientlibsTransformerFactory.java#L315 (based on the event topic:
com/adobe/granite/ui/librarymanager/INVALIDATED
).Now consider the following use case
a
embeds client library with categoryb
a
is correctly being generated onceb*
switches tob
The client library's MD5 of
a
is not invalidated, as there is no OSGi event which invalidates the embedding client library. Therefore the client library is requested with the same URL (and therefore potentially being delivered in the wrong version from the client's cache).If an embedded clientlibrary is moved out of an embedding clientlib (in the example from above by switching from
b
tob*
, both libraries are correctly invalidated, i.e. the embedded as well as the embedding one) but the invalidation does not take place vice versa.