Skip to content

Conversation

@agkloop
Copy link
Owner

@agkloop agkloop commented Dec 25, 2025

This pull request introduces major enhancements to the caching library, focusing on new storage backends, improved documentation, and robust CI/integration test infrastructure. The most significant updates are the addition of object storage backends (S3, GCS, LocalFileCache), a multi-level ChainCache, deduplication support for writes, and thorough documentation and testing for production use cases.

Major features and improvements:

Storage Backends and Caching Architecture

  • Added ChainCache for multi-level, composable cache hierarchies (e.g., InMem → Redis → S3/GCS/LocalFileCache), supporting per-level TTL and automatic promotion of hot data. [1] [2] [3]
  • Introduced S3Cache (AWS), GCSCache (Google Cloud), and LocalFileCache (filesystem) as new object storage backends with features like TTL via metadata, optional compression, and dedupe to avoid redundant writes. [1] [2] [3]
  • Enabled dedupe_writes for RedisCache, S3Cache, GCSCache, and LocalFileCache to skip rewriting unchanged payloads, reducing storage and network costs. [1] [2]

Documentation and Usage Guides

  • Expanded and reorganized the README.md to document new backends, ChainCache, dedupe semantics, and advanced configuration, including code samples and comparison tables. [1] [2] [3] [4]
  • Added a comprehensive production guide for BGCache (background refresh, single-writer/multi-reader) with best practices for error handling, cache topologies, and integration with object storage.

Testing and CI Infrastructure

  • Introduced a new GitHub Actions workflow (.github/workflows/ci.yml) to run unit tests and integration tests for S3 (via MinIO) and GCS (via fake-gcs-server) backends, ensuring reliability of new storage layers.
  • Added a docker-compose.yml for local development/testing with MinIO and fake-gcs-server services.

Changelog and Maintenance

  • Updated CHANGELOG.md to reflect all new features, fixes, and documentation improvements for version 0.2.2. [1] [2]

These changes significantly improve the flexibility, scalability, and production readiness of the library, especially for teams needing robust multi-tier caching and object storage integration.

@agkloop agkloop merged commit a1e2377 into main Dec 26, 2025
11 checks passed
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