Files
formbricks-formbricks/packages/lib/storage/cache.ts
Anshuman Pandey 21fe7080ef fix: uploads (#1449)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2023-10-25 14:50:48 +00: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));
},
};