public function LaravelCacheRepositoryAdapter::sear in Markdown 8.2
File
- src/
Util/ LaravelCacheRepositoryAdapter.php, line 165
Class
- LaravelCacheRepositoryAdapter
- Adapter for integrating Drupal cache with Laravel.
Namespace
Drupal\markdown\UtilCode
public function sear($key, Closure $callback) {
$value = $this
->get($key);
if (!isset($value)) {
$value = $callback();
$this
->forever($key, $value);
}
return $value;
}