Skip to content

glob-cache: update cache file when changed, automatically #196

@tunnckoCore

Description

@tunnckoCore

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?
await cacache.put(cacheLocation, file.path, file.contents);

on the if ctx.changed, and after the call of hooks.changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions