def _find_cache(): """ The application context will be automatically handled by _find_app method in flask """ app = _find_app() return app.cache
def _find_cache(): """The application context will be automatically handled by _find_app method in flask """ try: from flask.globals import _find_app app = _find_app() except ImportError: # Flask < 0.9 app = _lookup_object('app') return app.cache