Skip to content

Commit

Permalink
removed cachebust option (vercel#22)
Browse files Browse the repository at this point in the history
* removed cachebust option

* add cacheSeconds option to cart upsell

Co-authored-by: AJ Ancheta <aj@builder.io>
  • Loading branch information
ancheetah and ancheetah committed Sep 22, 2021
1 parent d9ba157 commit f932993
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/cart/CartSidebarView/CartSidebarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const CartSidebarView: FC = () => {
const items = cart?.lineItems || []
const cartUpsellContent = await builder
.get('cart-upsell-sidebar', {
cachebust: env.isDev,
cacheSeconds: 120,
userAttributes: {
itemInCart: items.map((item: any) => item.variant.product.handle),
} as any,
Expand Down
3 changes: 1 addition & 2 deletions components/common/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import React, { FC, useState, useEffect } from 'react'
import Link from 'next/link'
import { UserNav } from '@components/common'
import env from '@config/env'
import { BuilderComponent, builder } from '@builder.io/react'
import { useCart } from '@lib/shopify/storefront-data-hooks'
import { jsx, Themed, useThemeUI } from 'theme-ui'
Expand All @@ -22,7 +21,7 @@ const Navbar: FC = () => {
const items = cart?.lineItems || []
const anouncementContent = await builder
.get('announcement-bar', {
cachebust: env.isDev,
cacheSeconds: 120,
userAttributes: {
itemInCart: items.map((item: any) => item.variant.product.handle),
} as any,
Expand Down

0 comments on commit f932993

Please sign in to comment.