Elgg\Cache\Pool\StashWrapper::get PHP Метод

get() публичный Метод

public get ( $key, callable $callback = null, $default = null )
$callback callable
    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;
    }