Skip to content

Commit d297a73

Browse files
s-hertelAkasurde
andauthored
Update docs/docsite/rst/dev_guide/developing_inventory.rst
Co-authored-by: Abhijeet Kasurde <[email protected]>
1 parent 4aa807e commit d297a73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docsite/rst/dev_guide/developing_inventory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Before using the cache plugin, you must retrieve a unique cache key by using the
250250
self.load_cache_plugin()
251251
cache_key = self.get_cache_key(path)
252252
253-
.. note:: The ``get_cache_key`` method is designed to retrieve a unique key for the plugin name and the ``path`` parameter. Inventory plugins that need to generate many unique keys based on other factors should consider redefining or not using this helper.
253+
.. note:: The ``get_cache_key`` method is designed to retrieve a unique key for the plugin name and the ``path`` parameter. Inventory plugins that need to generate a lot of unique keys based on other factors should consider redefining or not using this helper.
254254

255255
Now that you've enabled caching, loaded the correct plugin, and retrieved a unique cache key, you can set up the flow of data between the cache and your inventory using the ``cache`` parameter of the ``parse`` method. This value comes from the inventory manager and indicates whether the inventory is being refreshed (such as by the ``--flush-cache`` or the meta task ``refresh_inventory``). Although the cache shouldn't be used to populate the inventory when being refreshed, the cache should be updated with the new inventory if the user has enabled caching. You can use ``self._cache`` like a dictionary. The following pattern allows refreshing the inventory to work in conjunction with caching.
256256

0 commit comments

Comments
 (0)