Files
formbricks/apps/web/lib/storage/cache.ts
2025-04-21 15:57:54 +02:00

17 lines
337 B
TypeScript

import { revalidateTag } from "next/cache";
interface RevalidateProps {
fileKey: string;
}
export const storageCache = {
tag: {
byFileKey(filekey: string): string {
return `storage-filekey-${filekey}`;
},
},
revalidate({ fileKey }: RevalidateProps): void {
revalidateTag(this.tag.byFileKey(fileKey));
},
};