Add metrics for ResponseCache

This commit is contained in:
Richard van der Hoff 2018-04-10 23:14:47 +01:00
parent 87478c5a60
commit b3384232a0
6 changed files with 21 additions and 7 deletions

View file

@ -115,7 +115,7 @@ class ReplicationSendEventRestServlet(RestServlet):
self.clock = hs.get_clock()
# The responses are tiny, so we may as well cache them for a while
self.response_cache = ResponseCache(hs, timeout_ms=30 * 60 * 1000)
self.response_cache = ResponseCache(hs, "send_event", timeout_ms=30 * 60 * 1000)
def on_PUT(self, request, event_id):
result = self.response_cache.get(event_id)