# persistent cache while using inventory\_plugin with python

**URL:** <https://forum.ansible.com/t/persistent-cache-while-using-inventory-plugin-with-python/36027>\
**Category:** Ansible Project\
**Created:** [November 23, 2021, 1:27pm UTC](https://forum.ansible.com/t/persistent-cache-while-using-inventory-plugin-with-python/36027 "2021-11-23T13:27:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve\_missoh](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@steve\_missoh](https://forum.ansible.com/u/steve_missoh)\
**Post date:** [November 23, 2021, 1:27pm UTC](https://forum.ansible.com/t/persistent-cache-while-using-inventory-plugin-with-python/36027/1 "2021-11-23T13:27:33Z")

</div>

Hi all,  
Can anyone point me to good resource detailing how to make use of jsonfile cache plugin in order to make it work with my custom inventory plugin (written in python) ?  
HELP !

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [November 23, 2021, 1:32pm UTC](https://forum.ansible.com/t/persistent-cache-while-using-inventory-plugin-with-python/36027/2 "2021-11-23T13:32:24Z")

</div>

Hi Steve,

You can take a look at this [link](https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html#inventory-cache). Also, simplest example of this implemented in [virtualbox inventory plugin](https://github.com/ansible-collections/community.general/blob/main/plugins/inventory/virtualbox.py).

---

<div class="post-metadata">

**Author:** ![steve\_missoh](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@steve\_missoh](https://forum.ansible.com/u/steve_missoh)\
**Post date:** [November 23, 2021, 1:44pm UTC](https://forum.ansible.com/t/persistent-cache-while-using-inventory-plugin-with-python/36027/3 "2021-11-23T13:44:10Z")

</div>

Thx Ab,  
let me give it a try
