Silber\Bouncer\CachedClipboard::sear PHP Method

sear() protected method

Get an item from the cache, or store the default value forever.
protected sear ( string $key, callable $callback ) : mixed
$key string
$callback callable
return mixed
    protected function sear($key, callable $callback)
    {
        if (is_null($value = $this->cache->get($key))) {
            $this->cache->forever($key, $value = $callback());
        }
        return $value;
    }