public function get($key, callable $callback = null, $default = null)
{
assert(is_string($key) || is_int($key));
$item = $this->stash->getItem((string) $key);
$result = $item->get();
if ($item->isMiss()) {
if (!$callback) {
return $default;
}
$item->lock();
$result = call_user_func($callback);
$this->stash->save($item->set($result));
}
return $result;
}