Skip to main content

Crate Cache

Crate Cache 

Source
Expand description

ยงCache ๐Ÿ“ฆ - process-wide caching primitives for Land ๐Ÿž๏ธ

Two independent caches that the Tauri host (Mountain) and any other Land embedder share:

  • AssetMemoryMap - file-backed mmap cache for bundled static assets. The bundled workbench under Element/Sky/Target/Static/Application/ is ~80 MB; per-request fs::read pays a syscall + alloc + memcpy on every fetch, whereas memmap2::Mmap hands the webview a borrowed slice of file-backed pages the OS can evict under pressure. Optional <file>.br siblings are picked up transparently for Content-Encoding: br.
  • PathCanon - process-wide canonical-path cache. Collapses repeated dunce::canonicalize calls used by fs-scope security gates. time_to_idle = 60s bounds staleness against external renames while hot paths stay cached indefinitely.

Both caches are additive performance helpers; consumers continue to function with any one of them disabled.

Modulesยง

AssetMemoryMap
Memory-mapped asset cache for the bundled workbench (and any other static-disk asset served via vscode-file://, tauri://, or land:// scheme handlers).
PathCanon
Process-wide canonical-path cache.