Function: cache()
cache<
TFileSystem>(filesystem,storage,options?):TFileSystem
Decorate a filesystem with read-through caching while preserving its exact concrete type and automatically delegating every uncached member.
Keys use <stable-hash>_<normalized-path>. Mutations enumerate the cache and
invalidate every same-filesystem key whose path is an ancestor or descendant
of a changed path, covering parent listings plus moved or deleted trees.
Type Parameters
Section titled “Type Parameters”TFileSystem
Section titled “TFileSystem”TFileSystem extends FileSystem<string>
Parameters
Section titled “Parameters”filesystem
Section titled “filesystem”TFileSystem
storage
Section titled “storage”options?
Section titled “options?”Returns
Section titled “Returns”TFileSystem