public function load($key, $closure, $lifetime = 60)
{
if (is_array($key)) {
$key = $this->key($key);
}
if ($lifetime == 0) {
return $closure();
}
$data = $this->cache->get($key, $lifetime);
if (!$data) {
$data = $closure();
$this->cache->save($key, $data, $lifetime);
}
return $data;
}