code: def setup_cache(app: Flask, cache_config) -> Optional[Cache]:
      
      if cache_config and cache_config.get('CACHE_TYPE') != 'null':
          return Cache(app, config=cache_config)
  
      return None
docs: Setup the flask-cache on a flask app