As it is now, we need to invalidate memcache, so we need to specify that value is None when `response.status_code != 304`. Moreover if `long_value` is not None but no `_etag` exists inside it then we need also to invalidate. I agree I don't like the 3 lingering `else: value = None` . What do you think about it ?