code: def clear_cached_endpoints(self, prefix=None):
          
          prefix = prefix if prefix is not None else self.cache_prefix
          for endpoint in self.app.op.values():
              cache_key = '%s:app:%s' % (prefix, endpoint.url)
              self.cache.invalidate(cache_key)
          self.cache.invalidate('%s:app:meta_swagger_url' % self.cache_prefix)
          self.app = None
docs: Invalidate all cached endpoints, meta included
  
          Loop over all meta endpoints to generate all cache key the
          invalidate each of them. Doing it this way will prevent the
          app not finding keys as the user may change its prefixes
          Meta endpoint will be updated upon next call.
          :param: prefix the prefix for the cache key (default is cache_prefix)