Skip to content

Conversation

@jmgilman
Copy link
Contributor

Summary

  • Add multi-layer caching with 5 cache types: content, blocks, refs, manifests, indexes
  • Implement per-cache enable/disable configuration
  • Add cache commands: status, path, clear
  • Add configurable ref cache TTL (default 5m)
  • Add comprehensive integration tests for cache functionality
  • Update README with caching documentation

Cache Types

Cache Description
content File content cache (deduplicated by hash across archives)
blocks HTTP range block cache
refs Tag to digest mappings
manifests OCI manifest cache
indexes Archive index cache

Configuration

cache:
  enabled: true
  dir: /custom/cache/path  # Optional
  ref_ttl: 5m              # TTL for refs cache

  # Per-cache control
  content:
    enabled: true
  indexes:
    enabled: false  # Example: disable specific cache

Test plan

  • Unit tests pass (go test ./...)
  • Integration tests pass (go test -tags=integration ./integration/...)
  • CI passes (just ci)
  • Cache integration test covers:
    • Initial empty state
    • Cache population via push/pull
    • Clear specific cache type
    • Clear all caches
    • Per-cache enable/disable via config
    • Custom cache directory
    • Invalid cache type error handling

🤖 Generated with Claude Code

Add multi-layer caching with per-cache control:

Cache types:
- content: File content cache (deduplicated by hash)
- blocks: HTTP range block cache
- refs: Tag to digest mappings (with configurable TTL)
- manifests: OCI manifest cache
- indexes: Archive index cache

Cache commands:
- `blob cache status`: Show cache sizes and file counts
- `blob cache path`: Show cache directory paths
- `blob cache clear [type]`: Clear all or specific caches

Configuration:
- Global cache enable/disable
- Per-cache enable/disable (cache.content.enabled, etc.)
- Custom cache directory (cache.dir)
- Ref cache TTL (cache.ref_ttl, default 5m)

Also includes:
- Comprehensive integration tests for cache functionality
- Unit tests for cache utilities and config types
- Updated README with caching documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman jmgilman merged commit ed360f2 into master Jan 25, 2026
7 checks passed
@jmgilman jmgilman deleted the feat/cache-support branch January 25, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants