)]}'
{"nova/api/ec2/ec2utils.py":[{"author":{"_account_id":2140,"name":"MotoKen","email":"motokentsai@gmail.com","username":"motokentsai"},"change_message_id":"5d32aa6f5bd076b2fab868b18450a246ab7967c8","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    return id_to_glance_id(context, image_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"@memoize"},{"line_number":93,"context_line":"def glance_id_to_ec2_id(context, glance_id, image_type\u003d\u0027ami\u0027):"},{"line_number":94,"context_line":"    image_id \u003d glance_id_to_id(context, glance_id)"},{"line_number":95,"context_line":"    return image_ec2_id(image_id, image_type\u003dimage_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2F8OU%3D","line":92,"updated":"2013-03-20 01:45:16.000000000","message":"this function should not add memoize","commit_id":"e23a94ec1ed3e6fd809e6b223bae7050cd7e4221"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"ccbf27153788915f5a49a51c56656e7877a57c78","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_CACHE \u003d None"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def memoize(func):"},{"line_number":39,"context_line":"    @functools.wraps(func)"},{"line_number":40,"context_line":"    def memoizer(context, reqid):"},{"line_number":41,"context_line":"        global _CACHE"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8FI%3D","line":38,"updated":"2013-03-20 05:49:24.000000000","message":"I don\u0027t love the name \"memoizer\" to be honest.","commit_id":"76844433f69a7c29ed4566ad34d7e9740feaf660"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"b8a8c0f3ea15b330719a61a3ab162a41562dcaa8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"_CACHE \u003d None"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def memoize(func):"},{"line_number":39,"context_line":"    @functools.wraps(func)"},{"line_number":40,"context_line":"    def memoizer(context, reqid):"},{"line_number":41,"context_line":"        global _CACHE"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8Ak%3D","line":38,"in_reply_to":"AAAAOH%2F%2F8FI%3D","updated":"2013-03-20 06:12:56.000000000","message":"the common name for this functionality is memoization:\n\nhttp://en.wikipedia.org/wiki/Memoization","commit_id":"76844433f69a7c29ed4566ad34d7e9740feaf660"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"f00f89bddf1fc227afb06cdb0cdc45f255afd043","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def memoizer(context, reqid):"},{"line_number":41,"context_line":"        global _CACHE"},{"line_number":42,"context_line":"        if not _CACHE:"},{"line_number":43,"context_line":"            _CACHE \u003d memorycache.get_client()"},{"line_number":44,"context_line":"        key \u003d \"%s:%s\" % (func.__name__, reqid)"},{"line_number":45,"context_line":"        value \u003d _CACHE.get(key)"},{"line_number":46,"context_line":"        if value is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8Ec%3D","line":43,"updated":"2013-03-20 05:58:17.000000000","message":"Why isn\u0027t this just using a real cache interface? \n\nI don\u0027t personally like built-in memory caches that are not size restricted (even though yes you have a 1 week expiry) since for deployers with a large number of users this introduces a leaking memory point when there are many ec2 tokens....","commit_id":"76844433f69a7c29ed4566ad34d7e9740feaf660"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"c9dd60d02a9c5c29551c5b13388347eed7d22c04","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def memoizer(context, reqid):"},{"line_number":41,"context_line":"        global _CACHE"},{"line_number":42,"context_line":"        if not _CACHE:"},{"line_number":43,"context_line":"            _CACHE \u003d memorycache.get_client()"},{"line_number":44,"context_line":"        key \u003d \"%s:%s\" % (func.__name__, reqid)"},{"line_number":45,"context_line":"        value \u003d _CACHE.get(key)"},{"line_number":46,"context_line":"        if value is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8AQ%3D","line":43,"in_reply_to":"AAAAOH%2F%2F8Aw%3D","updated":"2013-03-20 06:18:03.000000000","message":"Thanks for letting me know!","commit_id":"76844433f69a7c29ed4566ad34d7e9740feaf660"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2dfd55b77018d03ba6d3dfccf49c85e5a7c2760b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def memoizer(context, reqid):"},{"line_number":41,"context_line":"        global _CACHE"},{"line_number":42,"context_line":"        if not _CACHE:"},{"line_number":43,"context_line":"            _CACHE \u003d memorycache.get_client()"},{"line_number":44,"context_line":"        key \u003d \"%s:%s\" % (func.__name__, reqid)"},{"line_number":45,"context_line":"        value \u003d _CACHE.get(key)"},{"line_number":46,"context_line":"        if value is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOH%2F%2F8Aw%3D","line":43,"in_reply_to":"AAAAOH%2F%2F8Ec%3D","updated":"2013-03-20 06:11:41.000000000","message":"it does use a real cache interface. See memorycache, if you specify memache_servers it will use memcache. Also this doesn\u0027t cache tokens it caches the mapping of ec2_ids to instance_ids etc. Its hard to imagine that there will be an inordinate number of these in a single week.","commit_id":"76844433f69a7c29ed4566ad34d7e9740feaf660"}]}
