KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

How can I prevent caching data? Report shows old data all the time #1347

Open paulo opened this topic on on Mar 17, 2020 - 5 comments

paulo commented on Mar 17, 2020

Hi, My reporting are caching I think which is ok if data doesn't change, but at this time of the year, data is changing every hour, so is there an option to 'force refresh' the report from the browser, so report will refresh the data ?

Here is the call to my report:

  $report = new PlannerGoals();
                $report->run();
                return view("report",["report"=>$report]);

Here is the view:

 Table::create(array(
            "dataSource" => $this->dataStore("PlannerGoalsFile"),
                    "searching"=>true,
            "fixedHeader"=>true,
                "showHeader"=>true,
                "showFooter"=>"bottom",
            "columns" => array(
                "name",
... columns

here is the report class:

   $this->src('mysql')->query($PlannerGoalsFileQuery)
              ->pipe(new CalculatedColumn(array(
                     "TotalEst"=>function($data){
                         return ( $data["ETPlannerEst"]+$data["ETQuoterEst"]);
                     },
                 )))
            ->pipe($this->dataStore('PlannerGoalsFile'));

Note: I am using

use Friendship;
    use \koolreport\amazing\Theme;

I have not added any cache feature intentionally. thanks

David Winterburn commented on Mar 17, 2020

Hi Paulo,

Which PHP framework are you using together with KoolReport? Thanks!

paulo commented on Mar 17, 2020

Laravel. Thank you

paulo commented on Mar 17, 2020

it seems it fixed itself somehow ? I don't see it's being cached now. Not sure if the reboot fixed or not.

David Winterburn commented on Mar 18, 2020

Hi Paulo,

If this issue somehow happens again, please try clearing Laravel's cache like this:

https://tecadmin.net/clear-cache-laravel-5/

Thanks!

paulo commented on Mar 18, 2020

thank you. I do that when deploying the app only. I was trying to find a way of adding a button and clicking on 'refresh' , but that is ok. I will monitor for now and let you know. thank you very much for getting back!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

None