brefphp / secrets-loader

Load secret values from SSM into environment variables
https://bref.sh/docs/environment/variables.html#secrets
MIT License
13 stars 9 forks source link

Possible to cache in shared memory? #2

Open jaydiablo opened 1 year ago

jaydiablo commented 1 year ago

I noticed that this package caches the secrets it fetches from AWS in a temporary file: https://github.com/brefphp/secrets-loader/blob/main/src/Secrets.php#L69

From your testing, is it possible to leverage something like APCu to cache these in memory rather than on disk? If so, would this be something that could be configurable in the future for organizations that don't want secrets stored on disk?