mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 13:49:54 -06:00
17 lines
337 B
TypeScript
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));
|
|
},
|
|
};
|