- Category
- Developer Tools
- Rank
- No. 1480Tools index
Previous survey · No. 1487 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- block
- GitHub
- 41 stars
- Latest release
- v0.5.0
- Date
About
Super-fast application-level pass-through cache.
What it does
Cachew sits between engineering tools and their upstream services, then stores reusable responses with protocol-specific logic. It handles Git snapshots and packs, release assets, Go modules, Hermit packages, Artifactory, arbitrary HTTP hosts, and absolute-form proxy traffic. Memory, disk, and S3-compatible stores can form an ordered cache hierarchy.
Why it's ranked here
Cachew is compelling when repeated network fetches dominate developer or CI setup time. Its strongest case is Git, where snapshots accelerate full restores while pack caching helps incremental pulls. Tier backfilling, parallel writes, authorization policies, and operational endpoints make it more than a thin response store. The setup burden is correspondingly substantial.
What's good
The cache hierarchy has clear consistency rules: reads search nearby tiers, hits backfill them, and writes reach every tier concurrently. The final tier remains authoritative, while metadata and ETags identify stale replicas. GitHub App support covers private repositories and release assets. Policy tests run during server startup, preventing a known-bad authorization policy from reaching service.
Tradeoffs
Operators must configure both cache storage and metadata storage, then reason about tier order and authority. Private GitHub access adds tokens or an app, keys, and installation mapping. S3 uses separate data and companion metadata writes, so the implementation needs tags and a grace window to detect interleaving or interrupted commits. Git snapshot creation also requires scheduled maintenance settings.
How to use it well
Use Cachew for teams or CI fleets that repeatedly download the same repositories, modules, releases, packages, or large HTTP objects. Start with disk storage, then add memory for nearby reads or S3-compatible storage for shared authority. Test authorization policy at startup and monitor readiness. It does not replace source hosts, registries, or build orchestration.
Technical notes+
README.md documents the cache strategies, HCL configuration, cachewd server, cachew client, OPA authorization, metrics, and health endpoints. go.mod declares module github.com/block/cachew with Go 1.25.5. internal/cache/api.go defines the backend contract, including namespaces, conditional ETag requests, single byte ranges, abortable writes, invalidation, statistics, and atomic deletion. internal/cache/tiered.go treats the last backend as authoritative, writes tiers concurrently, validates replicas through stored ETags, and backfills lower tiers while streaming reads. internal/cache/disk.go combines files with bbolt metadata and striped locks. internal/cache/s3.go stores mutable metadata in companion objects, correlates data and metadata with random tags, and supports concurrent multipart transfers. internal/cache/s3_test.go runs the shared cache suite against MinIO in Docker and checks cancellation does not publish partial uploads.
Observed
- Primary language
- Go
- Go module
- github.com/block/cachew
- Command-line interfaces
- Separate cachewd server and cachew client commands
- Configuration
- HCL configuration with environment-variable substitution
- Cache backends
- Memory, local disk, and S3-compatible object storage
- Network interfaces
- Protocol-aware HTTP proxy, generic reverse proxy, and absolute-form HTTP proxy
- Authorization
- Open Policy Agent policies with optional startup tests
- Test structure
- S3 integration and soak tests use MinIO in Docker
Read from README.md, go.mod, internal/cache/s3.go, internal/cache/api.go, internal/cache/disk.go, internal/cache/etag.go, internal/cache/http.go, internal/cache/noop.go, internal/cache/range.go, internal/cache/memory.go, internal/cache/remote.go, internal/cache/tiered.go, internal/cache/s3_test.go, internal/config/config.go, internal/githubapp/jwt.go.
What it can do
Cache application data in memory
Application data requests → Cached data stored in memory
Retrieve cached data
Data request query → Previously cached data
Pass through uncached requests
Data requests not in cache → Data fetched from original source
Invalidate cache entries
Cache invalidation commands → Removed cache entries
Monitor cache hit rates
Cache access patterns → Performance metrics and statistics
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
