Invalidate cache items using tags
masterYou can attach tags to cached items using store.WithTags([]string{...}) during the Set operation. This allows you to invalidate groups of related items simultaneously using marshal.Invalidate with store.WithInvalidateTags([]string{...}).
// Set an item with a tag
err = marshal.Set(ctx, key, value, store.WithTags([]string{"book"}))
// Remove all items that have the "book" tag
err := marshal.Invalidate(ctx, store.WithInvalidateTags([]string{"book"}))