src/Application/SimpleApplication.php
public function cache(CacheInterface $cache = null) : CacheInterface
    {
        if ($cache){
            $this->cache = $cache;
        }
        if (!$this->cache){
            $this->cache = new NullCache;
        }
        return $this->cache;
    }
public function cache(CacheInterface $cache = null) : CacheInterface
    {
        if ($cache){
            $this->cache = $cache;
        }
        if (!$this->cache){
            $this->cache = new NullCache;
        }
        return $this->cache;
    }
Set/get cache

@param CacheInterface $cache

@return CacheInterface