App\Libraries\Utils::getFromCache PHP Метод

getFromCache() публичный статический Метод

public static getFromCache ( $id, $type )
    public static function getFromCache($id, $type)
    {
        $cache = Cache::get($type);
        if (!$cache) {
            static::logError("Cache for {$type} is not set");
            return null;
        }
        $data = $cache->filter(function ($item) use($id) {
            return $item->id == $id;
        });
        return $data->first();
    }