(domain, app_id)
return app
Cached version of ``get_app`` for use in phone
    api calls where most requests will be for app builds
    which are read-only.
    This only caches app builds.
Cached version of ``get_app`` for use in phone
    api calls where most requests will be for app builds
    which are read-only.
    This only caches app builds.
Cached version of get_app for use in phone api calls where most requests will be for app builds which are read - only . This only caches app builds .
def get_app_cached(domain, app_id):
    """Cached version of ``get_app`` for use in phone
    api calls where most requests will be for app builds
    which are read-only.
    This only caches app builds."""
    timeout = 24 * 3600
    # cache to save in localmemory and then in default cache (redis)
    #   Invalidation is not necessary as the builds don't get updated
    cache = tiered_django_cache([
        ('locmem', timeout, None),
        ('default', timeout, None)]
    )
    key = 'app_build_cache_{}_{}'.format(domain, app_id)
    app = cache.get(key)
    if not app:
        app = get_app(domain, app_id)
        if app.copy_of:
            cache.set(key, app)

    return app
def get_app_cached ( domain , app_id ) : timeout = 24 * 3600 # cache to save in localmemory and then in default cache (redis) #   Invalidation is not necessary as the builds don't get updated cache = tiered_django_cache ( [ ( 'locmem' , timeout , None ) , ( 'default' , timeout , None ) ] ) key = 'app_build_cache_{}_{}' . format ( domain , app_id ) app = cache . get ( key ) if not app : app = get_app ( domain , app_id ) if app . copy_of : cache . set ( key , app ) return app