web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Design & Build
Suggested answer

How to fix caching issue in Power Pages Site?

(2) ShareShare
ReportReport
Posted on by 37
Hi Folks,
 
In my power pages site I'm retrieving data from dataverse using Power Pages Web API. Everything's working fine except when I update the data in dataverse outside the power pages (via a Model Driven app), the change is not getting affected immediately when I open the site. It takes around 1 to 5 min to get the update reflected. For example I want to navigate the user to different pages based on data, which does not happen as expected shortly after the data is updated. 
 
Any thoughts on how to fix this?
 
Thanks,
Robin
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,344 Super User 2025 Season 2 on at
    How to fix caching issue in Power Pages Site?
     
    When calling the Web API from JavaScript, ensure you're preventing browser and server caching:

    fetch("/_api/table_name(guid)", {

      method: "GET",

      headers: {

        "Cache-Control": "no-cache",

        "Accept": "application/json"

      }

    })

    This content may have been partially translated, structured, or generated with Copilot 🏷️ Tag me if you have any further questions or if the issue persists. ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems. ❤️ Give it a Like if you found the approach useful in any way.
  • rbn_neu Profile Picture
    37 on at
    How to fix caching issue in Power Pages Site?
     
    Ya this is already in place but still it takes a few minutes before the database changes done outside power pages site is reflected on the power pages site.
     
     
  • Suggested answer
    Fubar Profile Picture
    8,191 Super User 2025 Season 2 on at
    How to fix caching issue in Power Pages Site?
    The caching you describe is by design by Microsoft (the SLA is actually 15 mins for updates from Dataverse to reflect on the portal, but usuall occurs within a few minutes).
     
    If you are using the Portals Web API, or where you may be using fetchxml in Liquid the workaround is to add a condition to your query that will make the query relatively unique but always return true (true so it doesn't impact the rest of your query) - as an example this can be done by adding a condition based on the Created On date where it is less than the date-time now (formatted down to seconds).
     
    e.g. a condition in Liquid
    <condition attribute="createdon" operator="on-or-before" value='{{ now | date: "yyyy-MM-dd HH:mm:ss" }}' />
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 79 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 56

#3
dgray304 Profile Picture

dgray304 39

Last 30 days Overall leaderboard

Featured topics