persistence
Enable, disable, or check cache persistence status to retain data across sessions, speeding up builds in long-running projects and CI environments.
Instructions
persistence
Unified cache persistence management - enable, disable, check status.
Overview
Single tool for persistence configuration. Routes to specialized handlers while maintaining clean operation semantics.
Operations
enable
Enable cache persistence to disk.
Parameters:
cacheDir(string, optional): Custom cache directory path
Example:
await persistenceTool({
operation: 'enable',
cacheDir: '/path/to/cache'
})Notes: Persists cache data across sessions. Useful for long-running projects or CI environments.
disable
Disable cache persistence.
Parameters:
clearData(boolean, optional): Clear existing persistent data on disable
Example:
await persistenceTool({
operation: 'disable',
clearData: true
})status
Check persistence status.
Parameters:
includeStorageInfo(boolean, optional): Include storage usage details
Example:
await persistenceTool({
operation: 'status',
includeStorageInfo: true
})Returns: Persistence status (enabled/disabled), cache directory path, and optional storage information.
When to Use
Enable persistence:
Long-running projects that benefit from cross-session cache
CI/CD environments where cache survives across builds
Development workflows where build history is valuable
Disable persistence:
Temporary debugging sessions
Testing with clean cache state
Clearing sensitive cached information
Related Tools
cache: Cache management and configuration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| cacheDir | No | ||
| clearData | No | ||
| includeStorageInfo | No |