-
Notifications
You must be signed in to change notification settings - Fork 0
Introducing a S3
cache adapter
#25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 4cd4d07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #25 +/- ##
==========================================
- Coverage 74.57% 64.60% -9.98%
==========================================
Files 21 22 +1
Lines 704 839 +135
Branches 162 164 +2
==========================================
+ Hits 525 542 +17
- Misses 177 295 +118
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new S3-backed cache adapter to support long-lived, restart-surviving cache entries.
- Implements
S3Cache
with standard cache operations (get
,set
,delete
,keys
,clear
,clearPattern
) using AWS SDK v3 - Exposes the adapter via the cache index and updates dependencies to include
@aws-sdk/client-s3
- Records the change in the project’s changelog
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
packages/utils/src/lib/server/cache/s3.ts | New S3Cache class implementing a cache over S3 |
packages/utils/src/lib/server/cache/index.ts | Export the new S3 cache adapter |
packages/utils/package.json | Added @aws-sdk/client-s3 to dependencies |
.changeset/nice-ants-care.md | Added changelog entry for the S3 cache adapter |
Comments suppressed due to low confidence (2)
packages/utils/src/lib/server/cache/s3.ts:22
- [nitpick] There are no JSDoc comments for the
S3Cache
class or its methods. Adding documentation for TTL semantics,keyPrefix
usage, and error-handling behavior would improve clarity for consumers.
export class S3Cache<V extends Uint8Array = Uint8Array> extends BaseCache<V> {
packages/utils/src/lib/server/cache/s3.ts:1
- The new
S3Cache
adapter lacks any unit or integration tests. Consider adding tests to cover the core operations (get
,set
,delete
, TTL expiration, error paths) to guard against regressions.
import { BaseCache } from './base';
@edoardocavazza Would be nice to add some tests… however if not practically feasible let's merge it. |
We’re introducing a new cache adapter backed by S3, designed for scenarios where cached files need to persist longer and survive application restarts.