[Spark] Use Psr\Cache instead of CAS for caching credentials

Review Request #1078 — Created Dec. 8, 2023 and submitted

pprkut
Lunr
9d50c3e...
lunr

Use Psr\Cache instead of CAS for caching credentials

GitHub actions run: https://github.com/pprkut/lunr/actions/runs/7141365175

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
smillernl
  1. 
      
  2. I'm not sure what the goal of this intermediary storage system is. Would it be faster than setting it for the class in the constructor?

    1. The purpose was to make sure credentials only need to be set once per request, not once per class. When you have a lot of classes covering different APIs of the same provider, you are likely to need more than one at a time. This was convenience to not have to set the same credentials 100 times.

      It's very dependent on the API and the provider though.

      With the new way though, storing credentials doesn't have to be limited to "per request" though. Now we could store credentials in a cache for a set period in time and only re-store it when the cache expires. This is not relevant if you have credentials in a config file, but it might if you fetch credentials from a remote system like Vault or AWS Secrets Manager.

  3. 
      
smillernl
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (1f560d2)
Loading...