# Builder Cacheing Issues?

**URL:** <https://forum.builder.io/t/builder-cacheing-issues/4261>\
**Category:** Technical Questions\
**Created:** [October 3, 2023, 12:02am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261 "2023-10-03T00:02:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 3, 2023, 12:02am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/1 "2023-10-03T00:02:16Z")

</div>

Is anyone experiencing odd behavior with Builder over the last 24-48 hours? We have noticed a few things:

1. Connected data being cached and returned with the wrong page. We have like 30 pages that have connected data and we noticed that when using the target query to fetch data our nextjs app would route to a new page and request for that pages data based on the URL but the builder API would return the response from the previous page request.

2. Builder objects removed in the UI but persisting on the editor page in a readonly mode. Example [Builder.io: Drag & Drop Headless CMS](https://builder.io/content/a799f101bbbf4498b2c70b0bf664a9d1)

3. Builder appending multiple image formats to the CDN URL making images not render.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 3, 2023, 2:42pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/2 "2023-10-03T14:42:30Z")

</div>

Hello @spm922,

To assist you better, could you please provide a few examples and screenshots to help us understand the issue you’re facing more clearly?

Additionally, if you could share the code for integrating the builder page, it would greatly aid us in providing you with a more precise and effective solution. Thank you!

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/josh/32/597_2.png) [@josh](https://forum.builder.io/u/josh)\
**Post date:** [October 5, 2023, 8:24am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/3 "2023-10-05T08:24:04Z")

</div>

This may be related. We’re getting reports from customers that they’re seeing old versions of pages. These old pages are still published but have new versions targeted at the same URL. I’m unable to replicate the issue myself, but have timestamped screenshots from customers showing the old page. It would appear to be a caching issue, but the page they’re receiving should have been overridden many days ago.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 5, 2023, 1:37pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/4 "2023-10-05T13:37:10Z")

</div>

Hello @josh,

You can try using cacheSeconds and cachebust option with your builder.get call and see if that helps

```auto
import { builder } from "@builder.io/react";

// replace model with your model name
const entry = await builder.get('my-model-name', {
  cacheSeconds: 10,
  cachebust: true,
})

```

> [@How long does the cache take to clear after publishing content?](https://forum.builder.io/t/how-long-does-the-cache-take-to-clear-after-publishing-content/453):
>
> When publishing your pages, the changes might not be immediate due to caching. Caching helps us ensure the best possible performance while keeping content reasonably fresh. We use a technique called [stale-while-revalidating caching](https://web.dev/stale-while-revalidate/) which updates the data based on how frequently data is requested. For example, if you update the content, but no one visits your site, your content may not update right away. The next time a user visits the site, they’ll see the cached version, while the latest versio…

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 5, 2023, 1:58pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/5 "2023-10-05T13:58:29Z")

</div>

Here’s an example

 ![Screenshot 2023-10-05 at 9.54.26 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/e/e193c3e640e2d1860531fc024217004319ff0bc5.png)

This the URL that builder is applying where format=webp is included twice

[![](https://cdn.builder.io/api/v1/image/assets%2F67d113c4afd947a7aa749b203e99ace6%2F61d0c12c317640ac8ee351921c38d48e?format=webp&format=webp&width=2000) ](https://cdn.builder.io/api/v1/image/assets%2F67d113c4afd947a7aa749b203e99ace6%2F61d0c12c317640ac8ee351921c38d48e?format=webp&format=webp&width=2000)

This is the content [Builder.io: Drag & Drop Headless CMS](https://builder.io/content/a799f101bbbf4498b2c70b0bf664a9d1).

If we switch to a jpg or png version of the image it works.

* * *

I can try to repro the cacheing issue I mentioned but will take me sometime to stage this in another builder space.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 5, 2023, 2:18pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/6 "2023-10-05T14:18:53Z")

</div>

Hello @spm922,

Thank you for bringing this to our attention.

It appears that the problem you’re facing may be linked to the uploading of webp images, which could potentially be causing compatibility issues within our platform. We have successfully replicated the issue on our end, and our dedicated team is actively working to investigate and find potential solutions.

At this time, while we are committed to resolving the issue as quickly as possible, we don’t have a specific timeline for when the fix will be deployed. Rest assured, we will keep you updated on our progress.

> **[Working with Images - Builder.io](https://www.builder.io/c/docs/images#how-builder-improves-image-performance)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually.

When you use Builder’s Image Block for your images, Builder serves the correct optimized format for every web browser. Builder performs these optimizations so you don’t have to:

- The Image Block ensures you load the smallest possible image.
- Builder analyzes your image as it relates to the layout of your page and determines the exact sizing of your image for all device sizes, automatically generating the optimal size for each screen.
- Builder uses lazy loading, which loads images only when your users need them. This reduces how much users have to download.
- Builder uses responsive page layout analysis to flag which images are below the page fold for each device so they can be lazy loaded.
- Builder converts your image to the **webp format.**

If you’re a developer and are looking for more control over the image that is served by Builder, read the [Image API](https://www.builder.io/c/docs/image-api) documentation.

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 5, 2023, 2:31pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/7 "2023-10-05T14:31:00Z")

</div>

Thank you! Are we able to specify the format from the default image block? This particular page is managed in the builder UI and not coded by us.

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 5, 2023, 2:48pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/8 "2023-10-05T14:48:55Z")

</div>

Hello @spm922,

You can append any accepted image format to the image CDN URL by pressing CMD + E or CTRL +E , however, this will not work if you are uploading or using webp image.

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 9, 2023, 12:55pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/9 "2023-10-09T12:55:53Z")

</div>

Thank you. This is good to know.

I’m also having issues with this page [Builder.io: Drag & Drop Headless CMS](https://builder.io/content/00f658d70b3d486bbc6139df04be851b). I’m unable to edit it. I’m trying to edit the custom component, service detail, but none of the text inputs are changing on the page. Could you take a look?

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 9, 2023, 1:55pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/10 "2023-10-09T13:55:11Z")

</div>

Hello @spm922,

The issue seems to be with the path `/tech-support/printer-setup` , do you possibly have any redirect setup for this path or are you handling urlPath differently for tech-support?

```auto
    .get("page", {
      userAttributes: {
        urlPath: "/" + ((params?.page as string[])?.join("/") || ""),
      },

```

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 9, 2023, 2:26pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/11 "2023-10-09T14:26:01Z")

</div>

No, there isn’t a redirect. This is our static props code for this page

```auto
export async function getStaticProps({
  params,
}: GetStaticPropsContext<{ page: string[] }>) {
  const page =
    (await builder
      .get("page", {
        userAttributes: {
          urlPath: "/" + (params?.page?.join("/") || ""),
        },
      })
      .toPromise()) || null;

  return {
    props: {
      page,
    },
    revalidate: 5,
    notFound: !page,
  };
}

```

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 9, 2023, 2:56pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/12 "2023-10-09T14:56:08Z")

</div>

Hello @spm922,

We’ve discovered a potential solution for the issue you were facing. By enabling the “Proxy Previews” option located in Settings → Advanced Settings → Advanced, it appears that the custom component “Service Details” input fields are now editable.

Could you please verify this and let us know if you encounter any additional questions or concerns?

 ![Screenshot 2023-10-09 at 8.19.55 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/2/2a9ab75a20aed58dba56b32dd700a33fe680203d.jpeg)  
 ![Screenshot 2023-10-09 at 8.21.55 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/7/70d9cae0c26261509bf8fcbe9a15d97fff9e0d27.jpeg)

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 15, 2023, 7:37pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/13 "2023-10-15T19:37:54Z")

</div>

Thanks this helps!

I was able to reproduce the connected data issue in an other space. Here’s a recording of the issue we are seeing [Loom | Free Screen & Video Recording Software | Loom](https://www.loom.com/share/87a8f3104e6d451089c559958cdbea9d?sid=2e8099e6-59bb-4b8b-869e-2cc28cb759d9).

Content in the recording

> **[Builder.io: Drag & Drop Headless CMS](https://builder.io/content/0532f9cbb45d412c97d98ead1d6a1154)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually..

> **[Builder.io: Drag & Drop Headless CMS](https://builder.io/content/6fdf1d53fc1c419f975da705ad8d28c2)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually..

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [October 16, 2023, 7:15am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/14 "2023-10-16T07:15:10Z")

</div>

Hello @spm922,

To address the caching issue, consider including the “cachebust: true” option in your builder’s get call. This will help ensure that your application fetches the most up-to-date content and may resolve any caching-related problems.

```auto
  const page = await builder
    .get("page", {
      userAttributes: {
        urlPath: "/" + ((params?.page as string[])?.join("/") || ""),
      },
      cachebust: true, 
    })
    .toPromise();

```

---

<div class="post-metadata">

**Author:** ![OmPrakash](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/omprakash/32/2751_2.png) [@OmPrakash](https://forum.builder.io/u/OmPrakash)\
**Post date:** [October 16, 2023, 7:24am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/15 "2023-10-16T07:24:52Z")

</div>

I noticed symbols on both pages, but there isn’t a symbol model. I suggest removing these symbols from both pages, publish the changes, and recheck. If the issue persists, consider adding `cacheburst: true` as recommended by @manish-sharma.

Please let us know if this resolves the issue.

 ![Symbols in layers](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/b/bd340fb7c0dfa38c49e295e0d39b47922a990703.png)

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 16, 2023, 1:42pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/16 "2023-10-16T13:42:41Z")

</div>

Here’s an updated video [https://www.loom.com/share/8f88c76ab1c34ac4bb8f252a087d19ba?sid=01137232-4c90-4e97-8ec1-3c185551f5a4](https://www.loom.com/share/8f88c76ab1c34ac4bb8f252a087d19ba?sid=01137232-4c90-4e97-8ec1-3c185551f5a4).

I added `cacheburst: true` and created a new page with no symbols or custom elements. I was able to reproduce the issue.

NOTE: This only happens when navigating internally using `next/link`. If I refresh the page I get the expected content.

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 19, 2023, 11:00am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/17 "2023-10-19T11:00:56Z")

</div>

Just wanted to follow up here. Any thoughts?

---

<div class="post-metadata">

**Author:** ![OmPrakash](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/omprakash/32/2751_2.png) [@OmPrakash](https://forum.builder.io/u/OmPrakash)\
**Post date:** [October 20, 2023, 8:35am UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/18 "2023-10-20T08:35:00Z")

</div>

It is quite unusual, it seems to be working fine on your main site though, right?  
Could you share the console errors duration the navigation, if any?

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 22, 2023, 9:39pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/19 "2023-10-22T21:39:11Z")

</div>

No, it’s not working on our main site. We are trying to migrate our service pages to use a connected data modal as the source instead of the the current hard coded method, but this issue is blocking that. I’m able to reproduce this in multiple builder spaces. Do have you any suggestions on how to fix this?

---

<div class="post-metadata">

**Author:** ![spm922](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@spm922](https://forum.builder.io/u/spm922)\
**Post date:** [October 27, 2023, 12:32pm UTC](https://forum.builder.io/t/builder-cacheing-issues/4261/20 "2023-10-27T12:32:57Z")

</div>

Just following up here. Any thoughts?

[Next page](https://forum.builder.io/t/builder-cacheing-issues/4261.md?page=2)
