Dear Team I have implemented the concept of Caching also but not use. Still it is taking lot of time to load the page and data.
automaker.php
<?php
use \koolreport\dashboard\sources\MySQL;
use \koolreport\dashboard\caching\FileCache;
class AutoMaker extends MySQL
{
protected function cache()
{
return FileCache::create();
}
protected function connection()
{
return [
"connectionString"=>"mysql:host=". $_SESSION['sqlHost'] .";dbname=". $_SESSION['c_db'] ."",
"username"=>$_SESSION['sqlUserName'],
"password"=>$_SESSION['sqlPassword'],
"charset"=>"utf8"
];
}
}
homeboard.php
<?php
use \koolreport\dashboard\containers\Row;
use \koolreport\dashboard\Dashboard;
use \koolreport\dashboard\containers\Panel;
//require_once "patient_main.php"
class HomeBoard extends Dashboard
{
protected function widgets()
{
return [
Panel::create()->header("Patient Statistics")->sub([
Row::create([
inquires::create()->cache("5min"),
appointments::create()->cache("5min"),
visits::create()->cache("5min"),
consultations::create()->cache("5min"),
registrations::create()->cache("5min"),
renewals::create()->cache("5min")
])
]),
Panel::create()->header("Payment Statistics")->sub([
Row::create([
cash::create(),
card::create(),
cheque::create(),
])
]),
branchdata::create()
];
}
}