Skip to main content
Scaffolds a cache adapter class and its test file into the target module. It writes modules/<module>/src/cache/<Name>Cache.ts and modules/<module>/tests/cache/<Name>Cache.spec.ts, and installs the @talosjs/cache dependency if it is missing.

Usage

talos cache:create [options]

Examples

talos cache:create
talos cache:create --name=UserSession
talos cache:create --name=ProductCatalog --module=catalog --override

Options

OptionDescriptionDefault
--nameResource name (the Cache suffix is appended automatically).Prompted if omitted
--moduleTarget module.shared
--overrideOverwrite an existing file without confirmation.false

AI Skill

This command ships a matching cache:create skill. Your AI agent uses it to generate a new cache adapter class and its test file, then implement get, set, delete, and has for the ICache interface from @talosjs/cache.
talos claude:init