@isaacs/cached
    Preparing search index...

    Function cachedMtime

    • Cache a synchronous FS function that takes a path as a single argument. The result cache will be invalidated whenever the mtime of the path changes. May specify minimum time between stat() calls in ms, and provide both a results cache and mtime cache.

      Type Parameters

      • R

      Parameters

      • fn: (path: string) => R
      • statFreqMs: number = 10
      • cache: MapLike<string, R> = ...
      • mtimeCache: MapLike<string, [mtime: number, lastStatTime: number]> = ...

      Returns MtimeCachedMethod<R>