Forum Discussion

WilliamA's avatar
WilliamA
Helper I
1 year ago
Solved

Power BI query cache time limit

Hi all,

 

I have a report using direct query. it reads from a database and every hour a column gets updated with the current datetime.

 

when I use this report with query caching enabled, the last refresh might be 10am and 4 hours later it is still 10am. 

Does anyone know the time limit for how long the cache is retained? can this be adjusted? I understand refreshing the dataset clears the cache but this is not feasible when having a large group of dashboards where refreshes aren't required.

 

I would like to understand how long this cache last and how it can be adjusted.

 

Thanks

  • Hi WilliamA ,

    • Since you mentioned that the report updates correctly in the Power BI Service but not in the embedded environment, it’s possible that caching is being applied at the embedding layer.
    • The query cache for Direct Query datasets lasts 1 hour and cannot be adjusted. Since Power BI Service updates correctly but the embedded environment does not, caching may be applied at the embedding layer.
    • Try enabling Automatic Page Refresh (APR) in the embedded setup or use the Power BI REST API to force updates.

     

    If our response addressed by the community member for  your query, please mark it as Accept Answer and click Yes if you found it helpful.

     

    Should you have any further questions, feel free to reach out.

    Thank you for being a part of the Microsoft Fabric Community Forum!
     

6 Replies

  • Hi WilliamA , The query cache duration for DirectQuery datasets is 1 hour You could try for Automatic Page Refresh 

    • Enable Automatic Page Refresh:

      • Go to Format → Page Refresh and set a shorter refresh interval. This works for DirectQuery in Power BI Service.
    • Optimize Queries:

      • Focus queries on the frequently changing data (datetime column).
        You could also check for live connection if it supports 
        If this post helped please do give a kudos and accept this as a solution
        Thanks In Advance

     

     

    • v-aatheeque's avatar
      v-aatheeque
      Community Support

      Hi WilliamA ,

      If the answer posted by Akash_Varuna  was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

      Should you have any further questions, feel free to reach out.
      Thank you for being a part of the Microsoft Fabric Community Forum!

  • page refresh has not recetified the situation.
    I can see through power BI service, the report is being updated correctly however through the embedded environment, the data is not being refreshed.

    • v-aatheeque's avatar
      v-aatheeque
      Community Support

      Hi WilliamA ,

      • Since you mentioned that the report updates correctly in the Power BI Service but not in the embedded environment, it’s possible that caching is being applied at the embedding layer.
      • The query cache for Direct Query datasets lasts 1 hour and cannot be adjusted. Since Power BI Service updates correctly but the embedded environment does not, caching may be applied at the embedding layer.
      • Try enabling Automatic Page Refresh (APR) in the embedded setup or use the Power BI REST API to force updates.

       

      If our response addressed by the community member for  your query, please mark it as Accept Answer and click Yes if you found it helpful.

       

      Should you have any further questions, feel free to reach out.

      Thank you for being a part of the Microsoft Fabric Community Forum!
       

      • v-aatheeque's avatar
        v-aatheeque
        Community Support

        Hi WilliamA ,

        If the answer posted by Akash_Varuna  was helpful, please consider marking Accept as solution to assist other members in finding it more easily.

         

        Should you have any further questions, feel free to reach out.
        Thank you for being a part of the Microsoft Fabric Community Forum!