public function getCache()
    {
        if ($this->cache) {
            return $this->cache;
        }

        if (property_exists($this, 'app') && $this->app instanceof ServiceContainer
            && isset($this->app['cache']) && $this->app['cache'] instanceof CacheInterface) {
            return $this->cache = $this->app['cache'];
        }

        return $this->cache = $this->createDefaultCache();
    }
public function getCache()
    {
        if ($this->cache) {
            return $this->cache;
        }

        if (property_exists($this, 'app') && $this->app instanceof ServiceContainer
            && isset($this->app['cache']) && $this->app['cache'] instanceof CacheInterface) {
            return $this->cache = $this->app['cache'];
        }

        return $this->cache = $this->createDefaultCache();
    }
public function getCache ( ) { if ( $ this -> cache ) { return $ this -> cache ; } if ( property_exists ( $ this , 'app' ) && $ this -> app instanceof ServiceContainer && isset ( $ this -> app [ 'cache' ] ) && $ this -> app [ 'cache' ] instanceof CacheInterface ) { return $ this -> cache = $ this -> app [ 'cache' ] ; } return $ this -> cache = $ this -> createDefaultCache ( ) ; }
Get cache instance.

@return \Psr\SimpleCache\CacheInterface
Get cache instance .