A cache for managing namespaced sub-caches, version 0.2.1. Last updated in 2017, this package is in maintenance mode with no recent releases. It provides a simple API to create named caches using map-cache internally. Differentiators: lightweight, minimalistic, but obsolete for modern applications with native Map or WeakMap.
npm install fragment-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a FragmentCache instance, sets and retrieves values from a namespaced sub-cache.
Use a modern cache library like node-cache or built-in Map.
Always provide 'name' as first argument.
Treat the returned cache as read-only to avoid unintended mutations.
Use fragment.get('users', 'key') to retrieve a specific value, or fragment.get('users') to get the whole cache.Use 'new FragmentCache()' to create an instance.