|
|
@@ -55,13 +55,15 @@ export function getPageCacheConfig(
|
|
|
/**
|
|
|
* Helper to create dynamic product cache config with specific product identifier
|
|
|
*/
|
|
|
-export function getProductCacheConfig(productId: string): PageCacheConfig {
|
|
|
- return {
|
|
|
- tags: ["products", `product-${productId}`],
|
|
|
- life: "hours",
|
|
|
- };
|
|
|
+// export function getProductCacheConfig(productId: string): PageCacheConfig {
|
|
|
+// return {
|
|
|
+// tags: ["products", `product-${productId}`],
|
|
|
+// life: "hours",
|
|
|
+// };
|
|
|
+// }
|
|
|
+export function getProductCacheConfig(): {noCache: boolean} {
|
|
|
+ return {noCache: true};
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* Helper to create dynamic category cache config with specific category identifier
|
|
|
*/
|
|
|
@@ -95,11 +97,11 @@ export async function cachedProductRequest<
|
|
|
TData = unknown,
|
|
|
TVariables extends OperationVariables = OperationVariables,
|
|
|
>(
|
|
|
- productId: string,
|
|
|
+ // productId: string,
|
|
|
query: DocumentNode,
|
|
|
variables?: TVariables,
|
|
|
): Promise<GraphqlRequestResult<TData>> {
|
|
|
- const config = getProductCacheConfig(productId);
|
|
|
+ const config = getProductCacheConfig();
|
|
|
return graphqlRequest<TData, TVariables>(query, variables, config);
|
|
|
}
|
|
|
|