Files
test/src/cache/cache.keys.ts
T

13 lines
621 B
TypeScript

export const keys = {
restaurantBySlug: (slug: string) => `restaurant:slug:${slug}`,
restaurantById: (id: string) => `restaurant:id:${id}`,
restaurantCategories: (restaurantId: string) =>
`restaurant:${restaurantId}:categories`,
restaurantItems: (restaurantId: string) => `restaurant:${restaurantId}:items`,
userRestaurants: (ownerId: string) => `user:${ownerId}:restaurants`,
category: (categoryId: string) => `category:${categoryId}`,
categoryItems: (categoryId: string) => `category:${categoryId}:items`,
item: (itemId: string) => `item:${itemId}`,
user: (userId: string) => `user:${userId}`,
};