def uwsgi(app, config, args, kwargs): if not has_UWSGICache: raise NotImplementedError("UWSGICache backend is not available, " "you should upgrade werkzeug module.") # The name of the caching instance to connect to, for # example: mycache@localhost:3031, defaults to an empty string, which # means uWSGI will cache in the local instance. If the cache is in the # same instance as the werkzeug app, you only have to provide the name of # the cache. uwsgi_cache_name = config.get("CACHE_UWSGI_NAME", "") kwargs.update(dict(cache=uwsgi_cache_name)) return UWSGICache(*args, **kwargs)
def uwsgi(app, config, args, kwargs): return UWSGICache.factory(app, config, args, kwargs)