Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
I think Dashboard cache is only supported in sql database datasources for now. But you can imitate it in your API datasource using some code from PDOSource.php like this:
protected function cache()
{
return \koolreport\dashboard\caching\FileCache::create(); //or MemCache, ApcCache
}
public function run()
{
...
$sql = $this->toQueryString(); // replace $sql here with your api call parameters
$cache = $this->cache(); //your datasource cache
if ($cache !== null) {
$cache->name($this->name() . $cache->name()); //To be unqiue
if ($this->owner !== null && $this->owner->hasProp("cache") === true && $this->owner->cache() !== null) {
$cache->ttl($this->owner->cache());
}
$store = $cache->get($sql);
if ($store !== null) {
return $store;
}
}
//otherwise, if there's no cache setting or cache data, get data from api directly
...
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo