Table of content
Database plugin for database-cache-layer
Installation
npx claude-plugins install @jeremylongshore/claude-code-plugins-plus/database-cache-layer
Contents
Folders: commands, skills
Files: LICENSE, README.md
Documentation
Database plugin for database-cache-layer
Installation
/plugin install database-cache-layer@claude-code-plugins-plus
Usage
/cache-layer
Features
- Database best practices
- Multi-database support
- Production-ready implementations
- Comprehensive documentation
Requirements
- Database access
- Appropriate permissions
Files
commands/cache-layer.mdoragents/cache-layer-agent.md- Main plugin logic
License
MIT
Included Skills
This plugin includes 1 skill definition:
implementing-database-caching
|
View skill definition
Database Cache Layer
This skill provides automated assistance for database cache layer tasks.
Prerequisites
Before using this skill, ensure:
- Redis server available or ability to deploy Redis container
- Understanding of application data access patterns and hotspots
- Knowledge of which queries/data benefit most from caching
- Monitoring tools to measure cache hit rates and performance
- Development environment for testing caching implementation
- Understanding of cache invalidation requirements for data consistency
Instructions
Step 1: Analyze Caching Requirements
- Profile database queries to identify slow or frequently executed queries
- Determine which data is read-heavy vs write-heavy
- Identify data that can tolerate eventual consistency
- Calculate expected cache size and Redis memory requirements
- Document current database load and target performance metrics
Step 2: Choose Caching Strategy
- Cache-Aside (Lazy Loading): Application checks cache first, loads from DB on miss
- Best for: Read-heavy workloads, unpredictable access patterns
- Pros: Only caches requested data, simple to implement
- Cons: Cache misses incur database hit, stale data possible
- Write-Through: Application writes to cache and database simultaneously
- Best for: Write-heavy workloads needing consistency
- Pros: Cache always consistent, no stale data
- Cons: Write latency, unnecessary caching of rarely-read data
- **Write-Behind (Write-Back)
…(truncated)