)]}'
{"oslo/vmware/openstack/common/memorycache.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"598d4a63fa52ed0d3d8981462404fef7710fb45b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    return client_cls(memcached_servers, debug\u003d0)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class Client(object):"},{"line_number":45,"context_line":"    \"\"\"Replicates a tiny subset of memcached client interface.\"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_83c65366","line":44,"updated":"2014-09-15 07:48:42.000000000","message":"This class (and the whole module) doesn\u0027t seem to be used anywhere. Could you please explain how this is going to be used and maybe create a separate patch for it?","commit_id":"f3d46ac4b7f3ab9bea0d4e2fdab2ad0f7bf98423"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a135e4c36eca76d876b95c5c42ade62c17a2dd93","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        This expunges expired keys during each get."},{"line_number":55,"context_line":"        \"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        now \u003d timeutils.utcnow_ts()"},{"line_number":58,"context_line":"        for k in list(self.cache):"},{"line_number":59,"context_line":"            (timeout, _value) \u003d self.cache[k]"},{"line_number":60,"context_line":"            if timeout and now \u003e\u003d timeout:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_a2c99827","line":57,"updated":"2014-09-14 23:02:47.000000000","message":"What about just having a thread that does this cleanup periodically instead? That way get calls don\u0027t take a hit.","commit_id":"f3d46ac4b7f3ab9bea0d4e2fdab2ad0f7bf98423"}],"oslo/vmware/service.py":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"42aae35ad88104ba5b2d320309ac61089e325c2e","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class MemoryCache(suds.cache.ObjectCache):"},{"line_number":72,"context_line":"    def __init__(self):"},{"line_number":73,"context_line":"        self.cache \u003d {}"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def get(self, id):"},{"line_number":76,"context_line":"        return self.cache.get(id, None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_7c47d21d","line":73,"updated":"2014-08-26 11:31:12.000000000","message":"Are we planning to access it outside?","commit_id":"a787912dda65c8bd02e0efd06363846eff26a1a8"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"95442193808845361d5d9a22837e2981ab7c8328","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class MemoryCache(suds.cache.ObjectCache):"},{"line_number":72,"context_line":"    def __init__(self):"},{"line_number":73,"context_line":"        self.cache \u003d {}"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def get(self, id):"},{"line_number":76,"context_line":"        return self.cache.get(id, None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_58148f43","line":73,"in_reply_to":"1abeadc6_7c47d21d","updated":"2014-08-28 03:16:06.000000000","message":"fixed.","commit_id":"a787912dda65c8bd02e0efd06363846eff26a1a8"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"42aae35ad88104ba5b2d320309ac61089e325c2e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def get(self, id):"},{"line_number":76,"context_line":"        return self.cache.get(id, None)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def put(self, id, object):"},{"line_number":79,"context_line":"        # If cache fills up above a specific"},{"line_number":80,"context_line":"        # threshold, then just start over"},{"line_number":81,"context_line":"        if (len(self.cache) \u003e 32):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_773b6d38","line":78,"updated":"2014-08-26 11:31:12.000000000","message":"Is this thread-safe?","commit_id":"a787912dda65c8bd02e0efd06363846eff26a1a8"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"95442193808845361d5d9a22837e2981ab7c8328","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def get(self, id):"},{"line_number":76,"context_line":"        return self.cache.get(id, None)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def put(self, id, object):"},{"line_number":79,"context_line":"        # If cache fills up above a specific"},{"line_number":80,"context_line":"        # threshold, then just start over"},{"line_number":81,"context_line":"        if (len(self.cache) \u003e 32):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_98b6273d","line":78,"in_reply_to":"1abeadc6_773b6d38","updated":"2014-08-28 03:16:06.000000000","message":"Vipin,\n\nBy the very nature of this cache, even if one thread adds an entry in the cache and another one initializes the cache, all we end up is the next get will end up with None which will just result in a fresh http request as the worst case. and yes, the python GIL ensures the cache.get/cache[] operations are thread safe (AIUI)\n\nthanks,\ndims","commit_id":"a787912dda65c8bd02e0efd06363846eff26a1a8"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"42aae35ad88104ba5b2d320309ac61089e325c2e","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def put(self, id, object):"},{"line_number":79,"context_line":"        # If cache fills up above a specific"},{"line_number":80,"context_line":"        # threshold, then just start over"},{"line_number":81,"context_line":"        if (len(self.cache) \u003e 32):"},{"line_number":82,"context_line":"            self.cache \u003d {}"},{"line_number":83,"context_line":"        self.cache[id] \u003d object"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_7cab52d6","line":81,"updated":"2014-08-26 11:31:12.000000000","message":"Can we have a constant for the threshold?","commit_id":"a787912dda65c8bd02e0efd06363846eff26a1a8"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"95442193808845361d5d9a22837e2981ab7c8328","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def put(self, id, object):"},{"line_number":79,"context_line":"        # If cache fills up above a specific"},{"line_number":80,"context_line":"        # threshold, then just start over"},{"line_number":81,"context_line":"        if (len(self.cache) \u003e 32):"},{"line_number":82,"context_line":"            self.cache \u003d {}"},{"line_number":83,"context_line":"        self.cache[id] \u003d object"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_583bafd0","line":81,"in_reply_to":"1abeadc6_7cab52d6","updated":"2014-08-28 03:16:06.000000000","message":"Done","commit_id":"a787912dda65c8bd02e0efd06363846eff26a1a8"}]}
