Report Caching
Report Caching
When I run a PHP report in localhost the most recent changes are not displayed - even a day later. How can I get the report to reflect the latest changes short of clearing the cache each time, something I would prefer not to have to do?
-
Lech Kulikowski
- Posts: 7506
- Joined: Tue Mar 20, 2018 5:34 am
Re: Report Caching
Hello,
What do you mean by "recent changes are not displayed"? What changes are not applied?
Thank you.
What do you mean by "recent changes are not displayed"? What changes are not applied?
Thank you.
Re: Report Caching
What I mean is that I am building the report and testing as I go along. If I add a field or move things around on the report, I don't see the change reflected in localhost. I'm building the report in the same folder that localhost points to so changes to the report should be reflected immediately.
-
Lech Kulikowski
- Posts: 7506
- Joined: Tue Mar 20, 2018 5:34 am
Re: Report Caching
Hello,
The browser caches static files based on their URL.
You can use the following code to load the report:
$report->loadFile('../reports/SimpleList.mrt?v= . rand()');
This way, the URL changes each time, and the updates will be visible immediately.
Thank you.
The browser caches static files based on their URL.
You can use the following code to load the report:
$report->loadFile('../reports/SimpleList.mrt?v= . rand()');
This way, the URL changes each time, and the updates will be visible immediately.
Thank you.