@isaacs/cached
    Preparing search index...

    Type Alias MtimeCachedMethod<R>

    Return type of cachedMtime()

    type MtimeCachedMethod<R> = {
        cache: MapLike<string, R>;
        getMtime: (path: string) => number | undefined;
        mtimeCache: MapLike<string, [mtime: number, lastStatTime: number]>;
        (path: string): R;
    }

    Type Parameters

    • R
    • Parameters

      • path: string

      Returns R

    Index

    Properties

    cache: MapLike<string, R>

    return value cache

    getMtime: (path: string) => number | undefined

    Get the numeric mtime value for a given path, if possible. Will statSync() the file if the mtime is not in the cache, or if the time since the lastStatTime is greater than the statFreqMs provided to cachedMtime.

    mtimeCache: MapLike<string, [mtime: number, lastStatTime: number]>

    cache of mtime values and the most recent peformance.now() value when the statSync was performed to read it.