Webiny\Component\Rest\Compiler\CacheDrivers\ArrayDriver::read PHP Method

read() public method

Read the compiled cache array.
public read ( $api, $class, $version ) : boolean | array
$api Name of the API.
$class Name of the class.
$version Version of the class.
return boolean | array Returns the compiled cache array, or false if cache is not found.
    public function read($api, $class, $version)
    {
        $cacheKey = md5($api . $class);
        if (isset($this->cache[$cacheKey]) && isset($this->cache[$cacheKey]['version'][$version])) {
            return $this->cache[$cacheKey]['version'][$version];
        }
        return false;
    }