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
Seems like currently, it detects that the file has changed, but doesn't update the cache to the new state. Thus, it always hits the changed hook.
It's easy like
// Update the changed file's cache,// Note: maybe we should handle that on glob-cache automatically?awaitcacache.put(cacheLocation,file.path,file.contents);
on the if ctx.changed, and after the call of hooks.changed.
The text was updated successfully, but these errors were encountered:
Use cacache.verify after the loop, and cacache.rm.content old content on changed.
Also add done/finish hook.
edit:
Seems like when you call verify it automatically cleans up the old content file and the index file. So, the only needed is to call it once at the end of all, such as in done hook.
The done hook is handy, if you don't want to include cacache as dep in the upper module. Or because version collisions. This way you use the same cacache version, as glob-cache one.
Make the default done hook do just that cacache.verify.
Seems like currently, it detects that the file has changed, but doesn't update the cache to the new state. Thus, it always hits the
changed
hook.It's easy like
on the
if ctx.changed
, and after the call ofhooks.changed
.The text was updated successfully, but these errors were encountered: