Closed marcjulianschwarz closed 5 months ago
Caching the token reduced the time to obtain it from around 200ms to 0.8ms.
Added a wrapper for the Cache class of Raycast to add expiration functionality for alle cache entries. That way we can make other values expire as well.
This wrapper could also be used to store the values for #2
Right now, the token is retrieved for every command interaction which takes time.
It would be better to cache the token for up to 24h (expiration time) and renew only when necessary.
Other values like the list of attendances (only retrieve new ones and store old ones) and employee numbers (update weekly) could also be cached.