(db, view_name, wrapper=None, cache_expire=COUCH_CACHE_TIMEOUT, force_invalidate=False,
                **params)
return FakeViewResults(
        cache_method(db, view_name, wrapper=wrapper, cache_expire=cache_expire,
                     force_invalidate=force_invalidate, **params)
    )
Entry point for caching views. See if it's in the generational view system, else juts call normal.
Entry point for caching views. See if it's in the generational view system, else juts call normal.
Entry point for caching views . See if it s in the generational view system else juts call normal .
def cached_view(db, view_name, wrapper=None, cache_expire=COUCH_CACHE_TIMEOUT, force_invalidate=False,
                **params):
    """
    Entry point for caching views. See if it's in the generational view system, else juts call normal.
    """
    from dimagi.utils.couch.cache.cache_core.gen import GlobalCache, GenerationCache
    generation_mgr = GenerationCache.view_generation_map()
    if view_name in generation_mgr:
        cache_method = generation_mgr[view_name].cached_view
    else:
        cache_method = GlobalCache.nogen().cached_view

    return FakeViewResults(
        cache_method(db, view_name, wrapper=wrapper, cache_expire=cache_expire,
                     force_invalidate=force_invalidate, **params)
    )
def cached_view ( db , view_name , wrapper = None , cache_expire = COUCH_CACHE_TIMEOUT , force_invalidate = False , * * params ) : from dimagi . utils . couch . cache . cache_core . gen import GlobalCache , GenerationCache generation_mgr = GenerationCache . view_generation_map ( ) if view_name in generation_mgr : cache_method = generation_mgr [ view_name ] . cached_view else : cache_method = GlobalCache . nogen ( ) . cached_view return FakeViewResults ( cache_method ( db , view_name , wrapper = wrapper , cache_expire = cache_expire , force_invalidate = force_invalidate , * * params ) )