def _process_request(self, request):
        if self.cache_anonymous_only:
            if not hasattr(request, 'user'):
                raise ImproperlyConfigured(
                    "The Django cache middleware with "
                    "CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True requires "
                    "authentication middleware to be installed. Edit your "
                    "MIDDLEWARE_CLASSES setting to insert "
                    "'django.contrib.auth.middleware.AuthenticationMiddleware'"
                    "before the CacheMiddleware."
                )

        if ('GET', 'HEAD') not in request.method:
            request._cache_update_cache = False
            # Don't bother checking the cache.
            return None

        #if (
        #    request.GET and
        #    not callable(self.key_prefix) and
        #    not self.only_get_keys
        #):
        #    request._cache_update_cache = False
        #    # Default behaviour for requests with GET parameters: don't bother
        #    # checking the cache.
        #    return None

        if self.cache_anonymous_only and request.user.is_authenticated():
            request._cache_update_cache = False
            # Don't cache requests from authenticated users.
            return None

        if callable(self.key_prefix):
            key_prefix = self.key_prefix(request)
            if key_prefix is None:
                request._cache_update_cache = False
                # Don't bother checking the cache if key_prefix function
                # returns magic "None" value.
                return None
        else:
            key_prefix = self.key_prefix

        with RequestPath(request, self.only_get_keys, self.forget_get_keys):
            cache_key = get_cache_key(request, key_prefix)

        if cache_key is None:
            request._cache_update_cache = True
            # No cache information available, need to rebuild.
            return None

        response = cache.get(cache_key, None)
        if response is None:
            request._cache_update_cache = True
            # No cache information available, need to rebuild.
            return None

        request._cache_update_cache = False
        if self.post_process_response_always:
            response = self.post_process_response_always(
                response,
                request=request
            )

        return response
dataset/ETHPy150Open peterbe/django-fancy-cache/fancy_cache/middleware.py/FetchFromCacheMiddleware._process_request/swapped operands of `not in`