summaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/policies/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/policies/base.py')
-rw-r--r--src/hydrilla/proxy/policies/base.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/hydrilla/proxy/policies/base.py b/src/hydrilla/proxy/policies/base.py
index bb95d29..8ffc45e 100644
--- a/src/hydrilla/proxy/policies/base.py
+++ b/src/hydrilla/proxy/policies/base.py
@@ -58,22 +58,21 @@ class Policy(ABC):
"""...."""
process_request: t.ClassVar[bool] = False
process_response: t.ClassVar[bool] = False
+ anticache: t.ClassVar[bool] = True
priority: t.ClassVar[PolicyPriority]
- @property
- def anticache(self) -> bool:
- return self.process_request or self.process_response
-
def consume_request(self, request_info: http_messages.RequestInfo) \
-> t.Optional[ProducedMessage]:
- """...."""
- return None
+ raise NotImplementedError(
+ 'This kind of policy does not consume requests.'
+ )
def consume_response(self, response_info: http_messages.ResponseInfo) \
-> t.Optional[http_messages.ProducedResponse]:
- """...."""
- return None
+ raise NotImplementedError(
+ 'This kind of policy does not consume responses.'
+ )
# mypy needs to be corrected: