Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
copykai
Resolver I
Resolver I

Publish to web hourly cache hack

The publish to web cache acts super weird and it not at all consistent. It states that the cache takes up to 60 minutes to clear which is definitely not something you can rely on.

I have a report that is published to web. Why? Because it shows the Danish electricity prices and is available to everyone. This information is actually not broad and well-known and I believe it might have something to do with bureaucracy and the non-willingness of energy companies to be transparent.

 

There were some problems where if the report were accessed at 12.50, new data came in 12.55, data was refreshed at 13.00, then it would wait until 13.55 before it had removed the cache and was able to show the new data.

I needed it to be updated every hour and came up with an idea.
You can use javascript to paramatize the iframes and I solved it with this code:

<html>
<head>
<title>Title</title>
</head>
<body>
<iframe id = "dynamicframe" title="EnergiNetV2" width="100%" height="100%" src="" frameborder="0" allowFullScreen="true"></iframe>



<script>
const hour = new Date().getHours(); 
let link;

if (hour % 2 == 0) {
 document.getElementById("dynamicframe").src="Link 1";
} else {
 document.getElementById("dynamicframe").src="Link 2";
}

</script>
</body>
</html>

 

 Of course you would need to setup two identical reports and datasets that has the exact same data and visuals.
But every even hour it shows report 1 and every odd hour it shows report 2.
This will simulate a hard cache reset every hour. If you need more refreshes you can expand it by minute, I guess.

At least it solved my issue and I can rely that new data shows at every hour.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi , @copykai 

Thanks a lot for your sharing. I think you should be very willing to share this matter with more users.

Please consider Accept it as the solution to help the other members find it more quickly .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi , @copykai 

Thanks a lot for your sharing. I think you should be very willing to share this matter with more users.

Please consider Accept it as the solution to help the other members find it more quickly .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors