def etag_request_processor(page, request):
    """
    Short-circuits the request-response cycle if the ETag matches.
    """

    def dummy_response_handler(*args, **kwargs):
        return __DummyResponse()

    def etagger(request, page, *args, **kwargs):
        etag = page.etag(request)
        return etag

    def lastmodifier(request, page, *args, **kwargs):
        lm = page.last_modified()
        return lm

    # Now wrap the condition decorator around our dummy handler:
    # the net effect is that we will be getting a DummyResponse from
    # the handler if processing is to continue and a non-DummyResponse
    # (should be a "304 not modified") if the etag matches.
    rsp = condition(etag_func=etagger, last_modified_func=lastmodifier)(
        dummy_response_handler
    )(request, page)

    # If dummy then don't do anything, if a real response, return and
    # thus shortcut the request processing.
    if not isinstance(rsp, __DummyResponse):
        return rsp

    Short-circuits the request-response cycle if the ETag matches.
    
feincms/module/page/processors.py