Sidekick
Definition
Sidekick is a lightning-fast server side caching Caddy module for PHP applications, with an emphasis on WordPress.
Features
- Performance Optimizations
- Buffer Pooling: Uses sync.Pool for efficient memory management
- Automatic Compression: Stores compressed versions (gzip, brotli, zstd) when beneficial
- Streaming to Disk: Large responses stream directly to disk instead of buffering in memory
- 304 Not Modified Support: Handles conditional requests with ETag and Last-Modified headers
- Pre-compiled Regex: Patterns compiled once during initialization
- Advanced Cache Management
- Configurable Cache Keys: Include query parameters, headers, and cookies in cache key generation
- Size Management: Fine-grained control over memory usage and cache limits
- Selective Caching: Path prefixes, regex patterns, and response codes
- Purge API: Secure cache invalidation endpoint
- WordPress Integration
- Automatic mu-plugin Deployment: Manages WordPress must-use plugins for cache purging and URL rewriting
- Checksum Verification: Ensures mu-plugin integrity with SHA-256 checksums
- Smart Directory Management: Creates directories as needed with parent directory validation
Settings
Sidekick is enabled and configured per Site, with defaults provided by the Site Type. Each query parameter on a request
is treated as no-cache, a cache key (each value cached separately), ignored (tracking IDs such as gclid), or unknown (the
request is not cached). See
Sidekick Settings for the full settings reference, how query parameters are handled, and how to adjust
list settings with +/-.
Try It Out
To try out Sidekick on a live site, try it out now here:
Create an Account
Screenshots

Source Code