)]}'
{"zuul/web/__init__.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"50d7c78105aab5372029631a79288855599c1803","unresolved":false,"context_lines":[{"line_number":920,"context_line":"            })"},{"line_number":921,"context_line":"        return ret"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    def _get_connection(self, tenant):"},{"line_number":924,"context_line":"        connection \u003d self._connection_map.get(tenant)"},{"line_number":925,"context_line":"        if connection:"},{"line_number":926,"context_line":"            return connection"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_ca9d7c58","line":923,"updated":"2020-11-04 03:40:58.000000000","message":"can\u0027t you just decorate this with\n\n @cachetools.func.ttl_cache(maxsize\u003d128, ttl\u003d600)\n\nhttps://cachetools.readthedocs.io/en/latest/#cachetools.func.ttl_cache","commit_id":"d93a72e953d6a4ff34bc1b52856c02c9dc40e10d"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"303c6c0ce76b9dbe249ebecb11bd02682b63b504","unresolved":false,"context_lines":[{"line_number":920,"context_line":"            })"},{"line_number":921,"context_line":"        return ret"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    def _get_connection(self, tenant):"},{"line_number":924,"context_line":"        connection \u003d self._connection_map.get(tenant)"},{"line_number":925,"context_line":"        if connection:"},{"line_number":926,"context_line":"            return connection"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_7b035874","line":923,"in_reply_to":"1f621f24_60ff2901","updated":"2020-11-04 09:15:16.000000000","message":"That feels problematic ... i don\u0027t really understand why it would work like this but not as a decorator, but it seems the general problem of calling it twice in tests and expecting different answers might be broken, and this hides it somehow?\n\nA random stackoverflow suggests that maybe the test infrastructure should be calling cache_clear() in between calls to the function, which to me feels overall a safer solution anyway ...","commit_id":"d93a72e953d6a4ff34bc1b52856c02c9dc40e10d"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"026128e5e239cc9527ba4c58fe55eafd8e585278","unresolved":false,"context_lines":[{"line_number":920,"context_line":"            })"},{"line_number":921,"context_line":"        return ret"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"    def _get_connection(self, tenant):"},{"line_number":924,"context_line":"        connection \u003d self._connection_map.get(tenant)"},{"line_number":925,"context_line":"        if connection:"},{"line_number":926,"context_line":"            return connection"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_60ff2901","line":923,"in_reply_to":"1f621f24_ca9d7c58","updated":"2020-11-04 07:24:42.000000000","message":"That was my first attempt but this breaks the tests since in this case cachetools uses global vars that don\u0027t get cleaned up between test cases.","commit_id":"d93a72e953d6a4ff34bc1b52856c02c9dc40e10d"}]}
