human
Complete this python program:
def backend_cache_page(handler, cache_time=None, cache_name=None):
assistant
#Here is the Python code you requested.

    """Applies all logic for getting a page to cache in our backend,
    and never in the browser, so we can control things from Django/Python.
    This function does this all with the settings we want, specified in settings.
    """
    if (not cache_time):
        cache_time = settings.CACHE_TIME
    if (not cache_name):
        cache_name = 'default'
    if caching_is_enabled():
        @condition(last_modified_func=partial(calc_last_modified, cache_name=cache_name))
        @cache_control(no_cache=True)
        @cache_page(cache_time, cache=cache_name)
        def backend_cache_page_wrapper_fn(request, *args, **kwargs):
            return handler(request, *args, **kwargs)
    else:
        def backend_cache_page_wrapper_fn(request, *args, **kwargs):
            return handler(request, *args, **kwargs)
    return backend_cache_page_wrapper_fn