)]}'
{"doc/source/contributor/caching-layer.rst":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5cc0042535df247250de9f99c006f1dd3f11ca0c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"pass function to the ``on_arguments`` decorator with the named argument ``should_cache_fn``."},{"line_number":31,"context_line":"In the ``keystone.common.cache`` module, there is a function called ``should_cache_fn``,"},{"line_number":32,"context_line":"which will provide a reference, to a function, that will consult the global cache"},{"line_number":33,"context_line":"``enabled`` option as well as the specific manager\u0027s caching enable toggle."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    .. NOTE::"},{"line_number":36,"context_line":"        If a section-specific boolean option is not defined in the config section specified when"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_682e0ffb","side":"PARENT","line":33,"updated":"2020-05-12 23:58:25.000000000","message":"I feel like you\u0027re trying to specifically remove the use of the term \"manager\" and I\u0027m not sure why? A manager is still a real thing in keystone, it\u0027s in the core.py file for a resource, and it\u0027s still where caching is handled.","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9524a334959996d6446efbbf5e4bbdc93420b4d9","unresolved":false,"context_lines":[{"line_number":30,"context_line":"pass function to the ``on_arguments`` decorator with the named argument ``should_cache_fn``."},{"line_number":31,"context_line":"In the ``keystone.common.cache`` module, there is a function called ``should_cache_fn``,"},{"line_number":32,"context_line":"which will provide a reference, to a function, that will consult the global cache"},{"line_number":33,"context_line":"``enabled`` option as well as the specific manager\u0027s caching enable toggle."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    .. NOTE::"},{"line_number":36,"context_line":"        If a section-specific boolean option is not defined in the config section specified when"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_4cde5f11","side":"PARENT","line":33,"in_reply_to":"ff570b3c_682e0ffb","updated":"2020-05-18 10:48:47.000000000","message":"I thought the user might get confused between managers and subsystems. So I preferred using one of them i.e Subsystems. But I agree with you that managers are a valid thing in keystone and caching is handled by it. I added the managers back in the doc.","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5cc0042535df247250de9f99c006f1dd3f11ca0c","unresolved":false,"context_lines":[{"line_number":23,"context_line":".. _oslo_cache: https://github.com/openstack/oslo.cache"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":26,"context_line":"sub-systems have an independent toggle within the config file to enable caching. The easiest"},{"line_number":27,"context_line":"method to utilize the toggle within the configuration file is to define a ``caching`` boolean"},{"line_number":28,"context_line":"option within their configuration section (e.g. ``resource``). Enable the global cache ``enabled``"},{"line_number":29,"context_line":"option as well as the specific section\u0027s caching enable toggle in order to cache subsystems."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_e8f4df89","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":11},"updated":"2020-05-12 23:58:25.000000000","message":"subsystems or sub-systems - pick one and be consistent","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9524a334959996d6446efbbf5e4bbdc93420b4d9","unresolved":false,"context_lines":[{"line_number":23,"context_line":".. _oslo_cache: https://github.com/openstack/oslo.cache"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":26,"context_line":"sub-systems have an independent toggle within the config file to enable caching. The easiest"},{"line_number":27,"context_line":"method to utilize the toggle within the configuration file is to define a ``caching`` boolean"},{"line_number":28,"context_line":"option within their configuration section (e.g. ``resource``). Enable the global cache ``enabled``"},{"line_number":29,"context_line":"option as well as the specific section\u0027s caching enable toggle in order to cache subsystems."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_2ce32bdb","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":11},"in_reply_to":"ff570b3c_e8f4df89","updated":"2020-05-18 10:48:47.000000000","message":"Done","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5cc0042535df247250de9f99c006f1dd3f11ca0c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"option within their configuration section (e.g. ``resource``). Enable the global cache ``enabled``"},{"line_number":29,"context_line":"option as well as the specific section\u0027s caching enable toggle in order to cache subsystems."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"The `oslo_cache`_ is simple and easy to adopt by any system. Here is the detailed `usage`_ guide of"},{"line_number":32,"context_line":"it. There are various cache `backends`_ supported by it. Example use of `oslo_cache`_ in"},{"line_number":33,"context_line":"keystone (in this example, ``resource`` is the subsystem):"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_48498bce","line":31,"range":{"start_line":31,"start_character":61,"end_line":31,"end_character":90},"updated":"2020-05-12 23:58:25.000000000","message":"don\u0027t use \"Here is...\" use \"See the `usage guide`_\" https://www.w3.org/QA/Tips/noClickHere","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9524a334959996d6446efbbf5e4bbdc93420b4d9","unresolved":false,"context_lines":[{"line_number":28,"context_line":"option within their configuration section (e.g. ``resource``). Enable the global cache ``enabled``"},{"line_number":29,"context_line":"option as well as the specific section\u0027s caching enable toggle in order to cache subsystems."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"The `oslo_cache`_ is simple and easy to adopt by any system. Here is the detailed `usage`_ guide of"},{"line_number":32,"context_line":"it. There are various cache `backends`_ supported by it. Example use of `oslo_cache`_ in"},{"line_number":33,"context_line":"keystone (in this example, ``resource`` is the subsystem):"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_6ce9a3b5","line":31,"range":{"start_line":31,"start_character":61,"end_line":31,"end_character":90},"in_reply_to":"ff570b3c_48498bce","updated":"2020-05-18 10:48:47.000000000","message":"Done","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5cc0042535df247250de9f99c006f1dd3f11ca0c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return some_value"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":".. _usage: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":46,"context_line":".. _backends: https://docs.openstack.org/keystone/latest/admin/configuration.html#caching-layer"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"It is recommended that each of the subsystems to have an independent configurable time-to-live (TTL)."},{"line_number":49,"context_line":"For consistency, it is recommended that this option be called ``cache_time`` and default to ``None``."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_68172fa5","line":46,"updated":"2020-05-12 23:58:25.000000000","message":"Use a relative link for keystone docs, see https://review.opendev.org/675667","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9524a334959996d6446efbbf5e4bbdc93420b4d9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return some_value"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":".. _usage: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":46,"context_line":".. _backends: https://docs.openstack.org/keystone/latest/admin/configuration.html#caching-layer"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"It is recommended that each of the subsystems to have an independent configurable time-to-live (TTL)."},{"line_number":49,"context_line":"For consistency, it is recommended that this option be called ``cache_time`` and default to ``None``."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_ecd493eb","line":46,"in_reply_to":"ff570b3c_68172fa5","updated":"2020-05-18 10:48:47.000000000","message":"Done","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5cc0042535df247250de9f99c006f1dd3f11ca0c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"   caching\u003dtrue"},{"line_number":61,"context_line":"   cache_time\u003d600"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"For more details over cache invalidation in keystone `read here`_."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. _read here: https://docs.openstack.org/keystone/latest/admin/configuration.html#cache-invalidation"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_082833e0","line":63,"range":{"start_line":63,"start_character":53,"end_line":63,"end_character":65},"updated":"2020-05-12 23:58:25.000000000","message":"https://www.w3.org/QA/Tips/noClickHere","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9524a334959996d6446efbbf5e4bbdc93420b4d9","unresolved":false,"context_lines":[{"line_number":60,"context_line":"   caching\u003dtrue"},{"line_number":61,"context_line":"   cache_time\u003d600"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"For more details over cache invalidation in keystone `read here`_."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. _read here: https://docs.openstack.org/keystone/latest/admin/configuration.html#cache-invalidation"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_ccd1cffd","line":63,"range":{"start_line":63,"start_character":53,"end_line":63,"end_character":65},"in_reply_to":"ff570b3c_082833e0","updated":"2020-05-18 10:48:47.000000000","message":"Done","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"5cc0042535df247250de9f99c006f1dd3f11ca0c","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"For more details over cache invalidation in keystone `read here`_."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. _read here: https://docs.openstack.org/keystone/latest/admin/configuration.html#cache-invalidation"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_48222b02","line":65,"updated":"2020-05-12 23:58:25.000000000","message":"https://review.opendev.org/675667","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"9524a334959996d6446efbbf5e4bbdc93420b4d9","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"For more details over cache invalidation in keystone `read here`_."},{"line_number":64,"context_line":""},{"line_number":65,"context_line":".. _read here: https://docs.openstack.org/keystone/latest/admin/configuration.html#cache-invalidation"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_acce1b57","line":65,"in_reply_to":"ff570b3c_48222b02","updated":"2020-05-18 10:48:47.000000000","message":"Done","commit_id":"a1349fc0a6498a367fd7adcc3e67fd7d60e357ea"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"912d8129a5225aa729505bb6813867c4d67946aa","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The caching layer is designed to be applied to any ``manager`` object within Keystone"},{"line_number":22,"context_line":"via the use of the ``on_arguments`` decorator provided in the ``keystone.common.cache``"},{"line_number":23,"context_line":"module.  This decorator leverages `dogpile.cache`_ caching system to provide a flexible"},{"line_number":24,"context_line":"caching backend."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_0d2efa90","side":"PARENT","line":22,"range":{"start_line":22,"start_character":64,"end_line":22,"end_character":85},"updated":"2020-05-19 20:58:15.000000000","message":"It looks like keystone.common.cache still exists. If that\u0027s the preferred entrypoint for caching in Keystone (and it\u0027s still documented below so I assume it is) maybe leave this and just change the dogpile.cache reference to oslo.cache?","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The caching layer is designed to be applied to any ``manager`` object within Keystone"},{"line_number":22,"context_line":"via the use of the ``on_arguments`` decorator provided in the ``keystone.common.cache``"},{"line_number":23,"context_line":"module.  This decorator leverages `dogpile.cache`_ caching system to provide a flexible"},{"line_number":24,"context_line":"caching backend."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_5ad7e64b","side":"PARENT","line":22,"range":{"start_line":22,"start_character":64,"end_line":22,"end_character":85},"in_reply_to":"ff570b3c_0d2efa90","updated":"2020-05-21 06:41:46.000000000","message":"Seems valid point. Thanks Ben.","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f342df192f7950ecff354f4afbb6de5b1d188419","unresolved":false,"context_lines":[{"line_number":55,"context_line":"not cached, the caching layer would call the function, pass the value to the ``SHOULD_CACHE``"},{"line_number":56,"context_line":"function reference, which would then determine if caching was globally enabled and enabled"},{"line_number":57,"context_line":"for the ``token`` manager.  If either caching toggle is disabled, the value is returned but"},{"line_number":58,"context_line":"not cached."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"It is recommended that each of the managers have an independent configurable time-to-live (TTL)."},{"line_number":61,"context_line":"If a configurable TTL has been defined for the manager configuration section, it is possible to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_52f25107","side":"PARENT","line":58,"updated":"2020-05-19 20:37:04.000000000","message":"The information in this paragraph is still valid, just the specifics of the variable and function names are different.","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":55,"context_line":"not cached, the caching layer would call the function, pass the value to the ``SHOULD_CACHE``"},{"line_number":56,"context_line":"function reference, which would then determine if caching was globally enabled and enabled"},{"line_number":57,"context_line":"for the ``token`` manager.  If either caching toggle is disabled, the value is returned but"},{"line_number":58,"context_line":"not cached."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"It is recommended that each of the managers have an independent configurable time-to-live (TTL)."},{"line_number":61,"context_line":"If a configurable TTL has been defined for the manager configuration section, it is possible to"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_3abe72fe","side":"PARENT","line":58,"in_reply_to":"ff570b3c_52f25107","updated":"2020-05-21 06:41:46.000000000","message":"Done","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"912d8129a5225aa729505bb6813867c4d67946aa","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The caching layer is designed to be applied to any ``manager`` object within Keystone"},{"line_number":22,"context_line":"via the use of `oslo_cache`_."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":".. _oslo_cache: https://github.com/openstack/oslo.cache"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_323d1ddd","line":22,"updated":"2020-05-19 20:58:15.000000000","message":"Nit: We typically refer to the Oslo projects by their . name, so oslo.cache vs. oslo_cache. oslo_cache is the module name for (possibly historical) technical reasons.","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The caching layer is designed to be applied to any ``manager`` object within Keystone"},{"line_number":22,"context_line":"via the use of `oslo_cache`_."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":".. _oslo_cache: https://github.com/openstack/oslo.cache"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_baca829d","line":22,"in_reply_to":"ff570b3c_323d1ddd","updated":"2020-05-21 06:41:46.000000000","message":"++","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f342df192f7950ecff354f4afbb6de5b1d188419","unresolved":false,"context_lines":[{"line_number":21,"context_line":"The caching layer is designed to be applied to any ``manager`` object within Keystone"},{"line_number":22,"context_line":"via the use of `oslo_cache`_."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":".. _oslo_cache: https://github.com/openstack/oslo.cache"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":27,"context_line":"managers have an independent toggle within the config file to enable caching. The easiest"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_8fb4c281","line":24,"updated":"2020-05-19 20:37:04.000000000","message":"Don\u0027t use github links. Github is just a mirror, it\u0027s not authoritative. Use opendev: https://opendev.org/openstack/oslo.cache","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f342df192f7950ecff354f4afbb6de5b1d188419","unresolved":false,"context_lines":[{"line_number":26,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":27,"context_line":"managers have an independent toggle within the config file to enable caching. The easiest"},{"line_number":28,"context_line":"method to utilize the toggle within the configuration file is to define a ``caching``"},{"line_number":29,"context_line":"boolean option within that manager\u0027s configuration section (e.g. ``resource``). Enable the"},{"line_number":30,"context_line":"global cache ``enabled`` option as well as the specific manager\u0027s caching enable toggle in"},{"line_number":31,"context_line":"order to cache that subsystem."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_d234a1e0","line":29,"range":{"start_line":29,"start_character":67,"end_line":29,"end_character":77},"updated":"2020-05-19 20:37:04.000000000","message":"why change this example? They\u0027re both good examples I just don\u0027t know why change it","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":27,"context_line":"managers have an independent toggle within the config file to enable caching. The easiest"},{"line_number":28,"context_line":"method to utilize the toggle within the configuration file is to define a ``caching``"},{"line_number":29,"context_line":"boolean option within that manager\u0027s configuration section (e.g. ``resource``). Enable the"},{"line_number":30,"context_line":"global cache ``enabled`` option as well as the specific manager\u0027s caching enable toggle in"},{"line_number":31,"context_line":"order to cache that subsystem."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_22cf0b80","line":29,"range":{"start_line":29,"start_character":67,"end_line":29,"end_character":77},"in_reply_to":"ff570b3c_053e5c28","updated":"2020-05-27 10:15:31.000000000","message":"I am not changing the example. There\u0027s no point in changing it.","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":26,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":27,"context_line":"managers have an independent toggle within the config file to enable caching. The easiest"},{"line_number":28,"context_line":"method to utilize the toggle within the configuration file is to define a ``caching``"},{"line_number":29,"context_line":"boolean option within that manager\u0027s configuration section (e.g. ``resource``). Enable the"},{"line_number":30,"context_line":"global cache ``enabled`` option as well as the specific manager\u0027s caching enable toggle in"},{"line_number":31,"context_line":"order to cache that subsystem."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_053e5c28","line":29,"range":{"start_line":29,"start_character":67,"end_line":29,"end_character":77},"in_reply_to":"ff570b3c_9acdfeb8","updated":"2020-05-26 21:58:51.000000000","message":"Feel free to use your own judgement, just add an explanation in the commit message.","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":26,"context_line":"The caching can be setup for all or some subsystems. It is recommended that each of the"},{"line_number":27,"context_line":"managers have an independent toggle within the config file to enable caching. The easiest"},{"line_number":28,"context_line":"method to utilize the toggle within the configuration file is to define a ``caching``"},{"line_number":29,"context_line":"boolean option within that manager\u0027s configuration section (e.g. ``resource``). Enable the"},{"line_number":30,"context_line":"global cache ``enabled`` option as well as the specific manager\u0027s caching enable toggle in"},{"line_number":31,"context_line":"order to cache that subsystem."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_9acdfeb8","line":29,"range":{"start_line":29,"start_character":67,"end_line":29,"end_character":77},"in_reply_to":"ff570b3c_d234a1e0","updated":"2020-05-21 06:41:46.000000000","message":"I thought it is easier to understand. But I realized I shouldn\u0027t have changed the old example. Thanks for pointing it out.","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f342df192f7950ecff354f4afbb6de5b1d188419","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"The `oslo_cache`_ is simple and easy to adopt by any system. See the `usage guide`_ of"},{"line_number":34,"context_line":"it. There are various cache :ref:`backends \u003ccaching_layer\u003e` supported by it. Example use of"},{"line_number":35,"context_line":"`oslo_cache`_ in keystone (in this example, ``resource`` is the manager):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":".. code-block:: python"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_52a41108","line":35,"range":{"start_line":35,"start_character":46,"end_line":35,"end_character":55},"updated":"2020-05-19 20:37:04.000000000","message":"again not really sure why the example was changed? this is how the token provider is cached: https://opendev.org/openstack/keystone/src/branch/master/keystone/token/provider.py#L41-L43","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"The `oslo_cache`_ is simple and easy to adopt by any system. See the `usage guide`_ of"},{"line_number":34,"context_line":"it. There are various cache :ref:`backends \u003ccaching_layer\u003e` supported by it. Example use of"},{"line_number":35,"context_line":"`oslo_cache`_ in keystone (in this example, ``resource`` is the manager):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":".. code-block:: python"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_fac7da94","line":35,"range":{"start_line":35,"start_character":46,"end_line":35,"end_character":55},"in_reply_to":"ff570b3c_52a41108","updated":"2020-05-21 06:41:46.000000000","message":"Done","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f342df192f7950ecff354f4afbb6de5b1d188419","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":".. _usage guide: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"It is recommended that each of the managers to have an independent configurable time-to-live"},{"line_number":50,"context_line":"(TTL). For consistency, it is recommended that this option be called ``cache_time`` and default"},{"line_number":51,"context_line":"to ``None``. If the ``cache_time`` is set to ``None``, the expiration time will be set to the"},{"line_number":52,"context_line":"global default ``expiration_time`` option in the ``[cache]`` configuration section. Example for"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_929a29b6","line":49,"range":{"start_line":49,"start_character":44,"end_line":49,"end_character":47},"updated":"2020-05-19 20:37:04.000000000","message":"remove this extra word, it was fine before","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":".. _usage guide: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"It is recommended that each of the managers to have an independent configurable time-to-live"},{"line_number":50,"context_line":"(TTL). For consistency, it is recommended that this option be called ``cache_time`` and default"},{"line_number":51,"context_line":"to ``None``. If the ``cache_time`` is set to ``None``, the expiration time will be set to the"},{"line_number":52,"context_line":"global default ``expiration_time`` option in the ``[cache]`` configuration section. Example for"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_dac2d684","line":49,"range":{"start_line":49,"start_character":44,"end_line":49,"end_character":47},"in_reply_to":"ff570b3c_929a29b6","updated":"2020-05-21 06:41:46.000000000","message":"Done","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"f342df192f7950ecff354f4afbb6de5b1d188419","unresolved":false,"context_lines":[{"line_number":61,"context_line":"   caching\u003dtrue"},{"line_number":62,"context_line":"   cache_time\u003d600"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_1292994c","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":46},"updated":"2020-05-19 20:37:04.000000000","message":"This links to the admin section, but this is the contributor documentation - we should update the cache invalidation example code instead of deleting it. Here\u0027s how we do cache invalidation nowadays: https://opendev.org/openstack/keystone/src/branch/master/keystone/resource/core.py#L826","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5e60dcf24f6c6cada6bf69731eb0a134af6e018b","unresolved":false,"context_lines":[{"line_number":61,"context_line":"   caching\u003dtrue"},{"line_number":62,"context_line":"   cache_time\u003d600"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"ff570b3c_1ab9ee13","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":46},"in_reply_to":"ff570b3c_1292994c","updated":"2020-05-21 06:41:46.000000000","message":"Done","commit_id":"00f66b40d7156cb6f252e6ba014aa28c335495b4"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        ..."},{"line_number":79,"context_line":"        return some_value"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"For cache invalidation, the ``on_arguments`` decorator will add an ``invalidate`` method"},{"line_number":82,"context_line":"(attribute) to your decorated function.  To invalidate the cache, you pass the same arguments"},{"line_number":83,"context_line":"to the ``invalidate`` method as you would the normal function."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Example (using the above cacheable_function):"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_08ae73e6","side":"PARENT","line":82,"range":{"start_line":81,"start_character":0,"end_line":82,"end_character":39},"updated":"2020-05-26 21:58:51.000000000","message":"Would be nice to keep this information - that the ``invalidate`` method exists on the decorated function. TBH I don\u0027t know exactly how that happens now (I think it\u0027s essentially the same as before but all happens under the hood in oslo.cache and dogpile) but it would still be best to emphasize that the .invalidate is called on the function, since it\u0027s a little confusing to see that just in code.","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        ..."},{"line_number":79,"context_line":"        return some_value"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"For cache invalidation, the ``on_arguments`` decorator will add an ``invalidate`` method"},{"line_number":82,"context_line":"(attribute) to your decorated function.  To invalidate the cache, you pass the same arguments"},{"line_number":83,"context_line":"to the ``invalidate`` method as you would the normal function."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Example (using the above cacheable_function):"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_82d5371e","side":"PARENT","line":82,"range":{"start_line":81,"start_character":0,"end_line":82,"end_character":39},"in_reply_to":"ff570b3c_08ae73e6","updated":"2020-05-27 10:15:31.000000000","message":"Done","commit_id":"07abf2fa4d5c2bc5dc1c77d700ac3589d1169d3f"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":".. _usage guide: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"With the above example, it call the ``_validate_token function`` would check to see if"},{"line_number":55,"context_line":"``token_id`` passed to it matched a currently valid cached item.  If the return value"},{"line_number":56,"context_line":"was cached, the caching layer would return the cached value; if the return value was"},{"line_number":57,"context_line":"not cached, the caching layer would call the function ``get_memoization_decorator``,"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_e521a8fe","line":54,"range":{"start_line":54,"start_character":24,"end_line":54,"end_character":31},"updated":"2020-05-26 21:58:51.000000000","message":"each call to","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":".. _usage guide: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"With the above example, it call the ``_validate_token function`` would check to see if"},{"line_number":55,"context_line":"``token_id`` passed to it matched a currently valid cached item.  If the return value"},{"line_number":56,"context_line":"was cached, the caching layer would return the cached value; if the return value was"},{"line_number":57,"context_line":"not cached, the caching layer would call the function ``get_memoization_decorator``,"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_22f8abc2","line":54,"range":{"start_line":54,"start_character":24,"end_line":54,"end_character":31},"in_reply_to":"ff570b3c_e521a8fe","updated":"2020-05-27 10:15:31.000000000","message":"Done","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":52,"context_line":".. _usage guide: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"With the above example, it call the ``_validate_token function`` would check to see if"},{"line_number":55,"context_line":"``token_id`` passed to it matched a currently valid cached item.  If the return value"},{"line_number":56,"context_line":"was cached, the caching layer would return the cached value; if the return value was"},{"line_number":57,"context_line":"not cached, the caching layer would call the function ``get_memoization_decorator``,"},{"line_number":58,"context_line":"which would then determine if caching was globally enabled and enabled for the ``token``"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_8578acf8","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":12},"updated":"2020-05-26 21:58:51.000000000","message":"the arguments","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":52,"context_line":".. _usage guide: https://docs.openstack.org/oslo.cache/latest/user/usage.html"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"With the above example, it call the ``_validate_token function`` would check to see if"},{"line_number":55,"context_line":"``token_id`` passed to it matched a currently valid cached item.  If the return value"},{"line_number":56,"context_line":"was cached, the caching layer would return the cached value; if the return value was"},{"line_number":57,"context_line":"not cached, the caching layer would call the function ``get_memoization_decorator``,"},{"line_number":58,"context_line":"which would then determine if caching was globally enabled and enabled for the ``token``"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_02f3e7e8","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":12},"in_reply_to":"ff570b3c_8578acf8","updated":"2020-05-27 10:15:31.000000000","message":"Done","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":54,"context_line":"With the above example, it call the ``_validate_token function`` would check to see if"},{"line_number":55,"context_line":"``token_id`` passed to it matched a currently valid cached item.  If the return value"},{"line_number":56,"context_line":"was cached, the caching layer would return the cached value; if the return value was"},{"line_number":57,"context_line":"not cached, the caching layer would call the function ``get_memoization_decorator``,"},{"line_number":58,"context_line":"which would then determine if caching was globally enabled and enabled for the ``token``"},{"line_number":59,"context_line":"manager.  If either caching toggle is disabled, the value is returned but not cached."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_258d60d3","line":57,"range":{"start_line":57,"start_character":36,"end_line":57,"end_character":83},"updated":"2020-05-26 21:58:51.000000000","message":"This is not what happens. ``get_memoization_decorator`` returns a decorator (a function). It\u0027s called when the module is loaded to generator the decorator, not at runtime to get a resource value.\n\nReading what we had before, ``MEMOIZE_TOKEN`` works exactly the same way: the callable function is still called because that is what gets the value from the backend, and then the value is passed to the decorator which is what determines whether to cache it for the future or not. So just keep this the same as before but update the name of the decorator.","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"With the above example, it call the ``_validate_token function`` would check to see if"},{"line_number":55,"context_line":"``token_id`` passed to it matched a currently valid cached item.  If the return value"},{"line_number":56,"context_line":"was cached, the caching layer would return the cached value; if the return value was"},{"line_number":57,"context_line":"not cached, the caching layer would call the function ``get_memoization_decorator``,"},{"line_number":58,"context_line":"which would then determine if caching was globally enabled and enabled for the ``token``"},{"line_number":59,"context_line":"manager.  If either caching toggle is disabled, the value is returned but not cached."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_a22ddb47","line":57,"range":{"start_line":57,"start_character":36,"end_line":57,"end_character":83},"in_reply_to":"ff570b3c_258d60d3","updated":"2020-05-27 10:15:31.000000000","message":"Done. Thanks for clarifying over this.","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":59,"context_line":"manager.  If either caching toggle is disabled, the value is returned but not cached."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"It is recommended that each of the managers have an independent configurable time-to-live"},{"line_number":62,"context_line":"(TTL). For consistency, it is recommended that this option be called ``cache_time`` and default"},{"line_number":63,"context_line":"to ``None``. If the ``cache_time`` is set to ``None``, the expiration time will be set to the"},{"line_number":64,"context_line":"global default ``expiration_time`` option in the ``[cache]`` configuration section. Example for"},{"line_number":65,"context_line":"caching ``token`` in ``/etc/keystone/keystone.conf``:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_8519cc89","line":62,"range":{"start_line":62,"start_character":7,"end_line":62,"end_character":41},"updated":"2020-05-26 21:58:51.000000000","message":"It\u0027s now all done by oslo.cache so this is not so much a recommendation as a requirement as these will get picked up by oslo.cache directly.","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"manager.  If either caching toggle is disabled, the value is returned but not cached."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"It is recommended that each of the managers have an independent configurable time-to-live"},{"line_number":62,"context_line":"(TTL). For consistency, it is recommended that this option be called ``cache_time`` and default"},{"line_number":63,"context_line":"to ``None``. If the ``cache_time`` is set to ``None``, the expiration time will be set to the"},{"line_number":64,"context_line":"global default ``expiration_time`` option in the ``[cache]`` configuration section. Example for"},{"line_number":65,"context_line":"caching ``token`` in ``/etc/keystone/keystone.conf``:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_021c8711","line":62,"range":{"start_line":62,"start_character":7,"end_line":62,"end_character":41},"in_reply_to":"ff570b3c_8519cc89","updated":"2020-05-27 10:15:31.000000000","message":"Done","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4a5aa2dbd68df426f7bf5230753a87cb4e964e53","unresolved":false,"context_lines":[{"line_number":61,"context_line":"It is recommended that each of the managers have an independent configurable time-to-live"},{"line_number":62,"context_line":"(TTL). For consistency, it is recommended that this option be called ``cache_time`` and default"},{"line_number":63,"context_line":"to ``None``. If the ``cache_time`` is set to ``None``, the expiration time will be set to the"},{"line_number":64,"context_line":"global default ``expiration_time`` option in the ``[cache]`` configuration section. Example for"},{"line_number":65,"context_line":"caching ``token`` in ``/etc/keystone/keystone.conf``:"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":".. code-block:: ini"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"   [cache]"},{"line_number":70,"context_line":"   enabled\u003dtrue"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"   [token]"},{"line_number":73,"context_line":"   caching\u003dtrue"},{"line_number":74,"context_line":"   cache_time\u003d600"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":77,"context_line":"Example of invalidating a cache (in this example, ``token`` is the manager):"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_452e94a5","line":74,"range":{"start_line":64,"start_character":84,"end_line":74,"end_character":17},"updated":"2020-05-26 21:58:51.000000000","message":"The old version was documenting what the code to implement this looked like, intended to be read by developers. I don\u0027t think it\u0027s necessary to include information for operators here, that\u0027s not the point of this document and it\u0027s already included in the admin guide. Keystone doesn\u0027t handle cache_time on its own any more, it\u0027s all done by oslo.cache, so just say that.","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"f6d97bedc8eeecd1250b820b63ffa9c69752de2f","unresolved":false,"context_lines":[{"line_number":61,"context_line":"It is recommended that each of the managers have an independent configurable time-to-live"},{"line_number":62,"context_line":"(TTL). For consistency, it is recommended that this option be called ``cache_time`` and default"},{"line_number":63,"context_line":"to ``None``. If the ``cache_time`` is set to ``None``, the expiration time will be set to the"},{"line_number":64,"context_line":"global default ``expiration_time`` option in the ``[cache]`` configuration section. Example for"},{"line_number":65,"context_line":"caching ``token`` in ``/etc/keystone/keystone.conf``:"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":".. code-block:: ini"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"   [cache]"},{"line_number":70,"context_line":"   enabled\u003dtrue"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"   [token]"},{"line_number":73,"context_line":"   caching\u003dtrue"},{"line_number":74,"context_line":"   cache_time\u003d600"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":77,"context_line":"Example of invalidating a cache (in this example, ``token`` is the manager):"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff570b3c_621bc31a","line":74,"range":{"start_line":64,"start_character":84,"end_line":74,"end_character":17},"in_reply_to":"ff570b3c_452e94a5","updated":"2020-05-27 10:15:31.000000000","message":"Done","commit_id":"a199f2c088a4816d878faffde4316743483e219a"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"bf49bf9b19afab9b3aec3bb48ade3e8bbb159182","unresolved":false,"context_lines":[{"line_number":63,"context_line":"(TTL). The option ``cache_time`` is to be set for every manager under its section in"},{"line_number":64,"context_line":"keystone.conf file. If the ``cache_time`` is set to ``None``, the expiration time will be"},{"line_number":65,"context_line":"set to the global default ``expiration_time`` option in the ``[cache]`` configuration section."},{"line_number":66,"context_line":"Keystone doesn\u0027t handle cache_time on its own any more, it\u0027s all done by oslo.cache."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":69,"context_line":"Example of invalidating a cache (in this example, ``token`` is the manager):"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff570b3c_8d5c3cee","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":84},"updated":"2020-05-27 21:29:18.000000000","message":"I would rephrase this as \"These options are passed to and handled by oslo.cache.\"","commit_id":"6ceded90e7e966736d1ea42c15109ba0d2b1acdd"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"22fd47e3e40b5f467d307f438a1710a196c34f6b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"(TTL). The option ``cache_time`` is to be set for every manager under its section in"},{"line_number":64,"context_line":"keystone.conf file. If the ``cache_time`` is set to ``None``, the expiration time will be"},{"line_number":65,"context_line":"set to the global default ``expiration_time`` option in the ``[cache]`` configuration section."},{"line_number":66,"context_line":"Keystone doesn\u0027t handle cache_time on its own any more, it\u0027s all done by oslo.cache."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":69,"context_line":"Example of invalidating a cache (in this example, ``token`` is the manager):"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff570b3c_934f21bc","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":84},"in_reply_to":"ff570b3c_8d5c3cee","updated":"2020-05-29 08:51:15.000000000","message":"I agree, I suppose we speak about the `expiration_time` here, this one is defined in the service\u0027s config [1] and then passed to oslo.cache through the keystone cache wrapper, so in this case keystone is part of the workflow on this point.\n\n[1] https://docs.openstack.org/oslo.cache/latest/configuration/index.html#cache.expiration_time","commit_id":"6ceded90e7e966736d1ea42c15109ba0d2b1acdd"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5555ad124a6e604ad6485b7fa2f47471ffc1f7f9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"(TTL). The option ``cache_time`` is to be set for every manager under its section in"},{"line_number":64,"context_line":"keystone.conf file. If the ``cache_time`` is set to ``None``, the expiration time will be"},{"line_number":65,"context_line":"set to the global default ``expiration_time`` option in the ``[cache]`` configuration section."},{"line_number":66,"context_line":"Keystone doesn\u0027t handle cache_time on its own any more, it\u0027s all done by oslo.cache."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":":ref:`Cache invalidation \u003ccache_invalidation\u003e` can be done if specific cache entries are changed."},{"line_number":69,"context_line":"Example of invalidating a cache (in this example, ``token`` is the manager):"}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff570b3c_966a597e","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":84},"in_reply_to":"ff570b3c_934f21bc","updated":"2020-06-01 07:02:30.000000000","message":"Done","commit_id":"6ceded90e7e966736d1ea42c15109ba0d2b1acdd"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"bf49bf9b19afab9b3aec3bb48ade3e8bbb159182","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        ..."},{"line_number":75,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"For cache invalidation you pass the same arguments to the ``invalidate`` method exists on the"},{"line_number":78,"context_line":"decorated function as you would the normal function, this means we need to pass \"self\" as the"},{"line_number":79,"context_line":"first argument before the arguments."},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff570b3c_ede5f80b","line":78,"range":{"start_line":77,"start_character":80,"end_line":78,"end_character":18},"updated":"2020-05-27 21:29:18.000000000","message":"This phrase is misplaced. You can reference the original wording to see how this should be phrased. I would say:\n\n\"For cache invalidation, there is an ``invalidate`` method (attribute) on the decorated function. To invalidate the cache, pass the same arguments to the ``invalidate`` method as you would the normal function. This means you need to pass ``self`` as the first argument.\"","commit_id":"6ceded90e7e966736d1ea42c15109ba0d2b1acdd"},{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"5555ad124a6e604ad6485b7fa2f47471ffc1f7f9","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        ..."},{"line_number":75,"context_line":"        self._validate_token.invalidate(self, token_id)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"For cache invalidation you pass the same arguments to the ``invalidate`` method exists on the"},{"line_number":78,"context_line":"decorated function as you would the normal function, this means we need to pass \"self\" as the"},{"line_number":79,"context_line":"first argument before the arguments."},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"ff570b3c_7667c5b8","line":78,"range":{"start_line":77,"start_character":80,"end_line":78,"end_character":18},"in_reply_to":"ff570b3c_ede5f80b","updated":"2020-06-01 07:02:30.000000000","message":"Done","commit_id":"6ceded90e7e966736d1ea42c15109ba0d2b1acdd"}]}
