Skip to content
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

feat: experimental tagging support #57

Merged
merged 10 commits into from
Feb 16, 2025
Merged

feat: experimental tagging support #57

merged 10 commits into from
Feb 16, 2025

Conversation

Julien-R44
Copy link
Owner

@Julien-R44 Julien-R44 commented Feb 16, 2025

Add experimental tagging support. See #53

This PR also add setOptions to factory context, and new options. See changesets for more details.

await bento.getOrSet({
  key: 'foo',
  factory: getFromDb(),
  tags: ['tag-1', 'tag-2']
});

await bento.set({ 
  key: 'foo',
  tags: ['tag-1']
});

Then, we can delete all entries tagged with tag-1 using:

await bento.deleteByTags({ tags: ['tag-1'] });

Copy link

changeset-bot bot commented Feb 16, 2025

🦋 Changeset detected

Latest commit: 40eeab4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
bentocache Minor

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

Copy link

cloudflare-workers-and-pages bot commented Feb 16, 2025

Deploying bentocache with  Cloudflare Pages  Cloudflare Pages

Latest commit: 40eeab4
Status: ✅  Deploy successful!
Preview URL: https://7635fbed.bentocache.pages.dev
Branch Preview URL: https://feat-tagging.bentocache.pages.dev

View logs

@Julien-R44 Julien-R44 merged commit 886f3ae into main Feb 16, 2025
9 checks passed
@Julien-R44 Julien-R44 mentioned this pull request Feb 16, 2025
@Julien-R44 Julien-R44 deleted the feat/tagging branch February 16, 2025 02:18
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.

1 participant