Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use in-memory cache #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

use in-memory cache #5

wants to merge 2 commits into from

Conversation

hdluc
Copy link

@hdluc hdluc commented Oct 18, 2022

Using a global hashtable instead of diskcache. I wanted the caching to improve perfomance since I had a slow EBS volume in AWS and caching to sqlite didn't provide the expected performance boost.

Use global dict as hashtable instead of using diskcache to have the caching in-memory
removed dependency on diskcache
@MaximilianMeister
Copy link

@hdluc works great in my setup, thanks! Just found this repo out of necessity, and then saw your PR. I like it because it also removes the diskcache dependency which saves me from rebuilding the environment

@AnatomicJC
Copy link

Very useful! Thanks for your improvement! 👍

@MaximilianMeister
Copy link

@AnatomicJC just saw your comment, btw we use this to do cached lookups for the passbolt lookups and it works great

@AnatomicJC
Copy link

@MaximilianMeister I just discovered this cached lookup to improve a home-made lookup slowness and I was thinking about the passbolt one 😄

Thank you for the feedback :)

@AnatomicJC
Copy link

Finally, I reverted back to the original codebase. I'm using a home made playbook and custom lookup I can't refactor.

Without the cached lookup, my playbook takes around one minute.
With the local disk cache, it takes ~12 seconds
With this PR, it takes ~30 seconds.

I guess it is because the in-memory cache is rebuilt on each task of my playbook.- I didn't check this other PR with memcached yet.

AnatomicJC added a commit to passbolt/lab-passbolt-ansible-collection that referenced this pull request Jun 4, 2024
Experimental: add in-memory lookup cache from
GoodRx/ansible-cached-lookup#5

Fixes #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants