AcquiaLiftReportCache.inc in Acquia Lift Connector 7.2
File
includes/AcquiaLiftReportCache.inc
View source
<?php
class AcquiaLiftReportCache implements AcquiaLiftReportCacheInterface {
protected $cache = array();
protected $bin = 'cache_acquia_lift_reports';
public function getCachedReports($agent_name) {
if (!isset($this->cache[$agent_name])) {
if ($get = cache_get($agent_name, $this->bin)) {
$this->cache[$agent_name] = $get->data;
}
else {
$this->cache[$agent_name] = FALSE;
}
}
return $this->cache[$agent_name];
}
public function cacheReports($agent_name, $data) {
cache_set($agent_name, $data, $this->bin);
}
}