Abstract cache interface backed by tapable hooks for reading, writing, idle transitions, and shutdown across webpack cache implementations.
new Cache(): Cache
CacheInitializes the cache lifecycle hooks implemented by cache backends.
Source Code: lib/Cache.js#L68ObjectSyncHook<[]>AsyncParallelHook<[]>AsyncParallelHook<[]>numbernumbernumbernumbercache.beginIdle(): void
Signals that webpack is entering an idle phase and cache backends may flush or compact pending work.
cache.endIdle(callback): void
CallbackCacheCache<void>Signals that webpack is leaving the idle phase and waits for cache backends to finish any asynchronous resume work.
cache.get(identifier, etag, callback): void
Retrieves a cached value and lets registered gotHandlers observe the
result before the caller receives it.
cache.shutdown(callback): void
CallbackCacheCache<void>Shuts down every registered cache backend and waits for cleanup to finish.
cache.store(identifier, etag, data, callback): void
Stores a cache entry for the identifier and etag through the registered cache backend hooks.
cache.storeBuildDependencies(dependencies, callback): void
CallbackCacheCache<void>Persists the set of build dependencies required to determine whether the cache can be restored in a future compilation.