)]}'
{"keystone/catalog/core.py":[{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"15e0cb4c9af5ff9c0e7a9fe13c8dbf79f76fb26e","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"CONF \u003d config.CONF"},{"line_number":33,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":34,"context_line":"SHOULD_CACHE \u003d cache.should_cache_fn(\u0027catalog\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"EXPIRATION_TIME \u003d lambda: CONF.catalog.cache_time"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1f776ed5","line":34,"updated":"2014-07-11 06:14:13.000000000","message":"This will require an additional flag in keystone.common.config for the catalog section for caching (see the [token] section to see how this is done).","commit_id":"7852d5d76e8c0ae585b22274d51244c56956f627"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"15e0cb4c9af5ff9c0e7a9fe13c8dbf79f76fb26e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":34,"context_line":"SHOULD_CACHE \u003d cache.should_cache_fn(\u0027catalog\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"EXPIRATION_TIME \u003d lambda: CONF.catalog.cache_time"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def format_url(url, data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3f7272e3","line":36,"updated":"2014-07-11 06:14:13.000000000","message":"This needs a new config option to be added in keystone.common.config in the catalog section for cache_time. see the [token] section for how this is done.","commit_id":"7852d5d76e8c0ae585b22274d51244c56956f627"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"15e0cb4c9af5ff9c0e7a9fe13c8dbf79f76fb26e","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def delete_service(self, service_id):"},{"line_number":122,"context_line":"        try:"},{"line_number":123,"context_line":"            return self.driver.delete_service(service_id)"},{"line_number":124,"context_line":"        except exception.NotFound:"},{"line_number":125,"context_line":"            raise exception.ServiceNotFound(service_id\u003dservice_id)"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_df125661","line":123,"updated":"2014-07-11 06:14:13.000000000","message":"Before the method returns, any endpoint associated with the service will need (after delete is complete, before return) :\n\n    self.get_endpoint.invalidate(self, endpoint_id)\n\nThis also needs to invalidate the service cache (after delete occurs, before return):\n\n    self.get_service.invalidate(self, service_id)","commit_id":"7852d5d76e8c0ae585b22274d51244c56956f627"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"15e0cb4c9af5ff9c0e7a9fe13c8dbf79f76fb26e","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def delete_endpoint(self, endpoint_id):"},{"line_number":139,"context_line":"        try:"},{"line_number":140,"context_line":"            return self.driver.delete_endpoint(endpoint_id)"},{"line_number":141,"context_line":"        except exception.NotFound:"},{"line_number":142,"context_line":"            raise exception.EndpointNotFound(endpoint_id\u003dendpoint_id)"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_fa0c883d","line":140,"updated":"2014-07-11 06:14:13.000000000","message":"This needs to invalidate the cache (after delete occurs, before return):\n\n    self.get_endpoint.invalidate(self, endpoint_id)","commit_id":"7852d5d76e8c0ae585b22274d51244c56956f627"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"15e0cb4c9af5ff9c0e7a9fe13c8dbf79f76fb26e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @cache.on_arguments(should_cache_fn\u003dSHOULD_CACHE,"},{"line_number":157,"context_line":"                        expiration_time\u003dEXPIRATION_TIME)"},{"line_number":158,"context_line":"    def get_catalog(self, user_id, tenant_id, metadata\u003dNone):"},{"line_number":159,"context_line":"        try:"},{"line_number":160,"context_line":"            return self.driver.get_catalog(user_id, tenant_id, metadata)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7a2f9888","line":157,"updated":"2014-07-11 06:14:13.000000000","message":"This is going to be difficult to cache, as any change to the endpoint or the services needs to invalidate the catalog, but the catalog cache has arguments that are unknown to the delete/create calls for both service and endpoint.\n\nI am unsure how to properly invalidate the cache for .get_catlog on delete/create calls.","commit_id":"7852d5d76e8c0ae585b22274d51244c56956f627"},{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"37b0299ed14c4945d6b5d9622ef05ca853ba955d","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @cache.on_arguments(should_cache_fn\u003dSHOULD_CACHE,"},{"line_number":157,"context_line":"                        expiration_time\u003dEXPIRATION_TIME)"},{"line_number":158,"context_line":"    def get_catalog(self, user_id, tenant_id, metadata\u003dNone):"},{"line_number":159,"context_line":"        try:"},{"line_number":160,"context_line":"            return self.driver.get_catalog(user_id, tenant_id, metadata)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_d4b29f05","line":157,"in_reply_to":"baada198_7a2f9888","updated":"2014-07-16 07:10:05.000000000","message":"There are two solutions to this problem.\n1. Create a set of related keys and delete the keys present in the set.\n2. Create a different region for this related set of functions and invalidate the region itself. \n\nIMO the second way is easy and efficient. None of the two is a clean approach though.","commit_id":"7852d5d76e8c0ae585b22274d51244c56956f627"}]}
