anomaly / gallagher

The missing toolkit for extending Gallagher Command Centre, featuring a CLI, SQL interface, TUI and a Python idiomatic SDK
https://anomaly.github.io/gallagher/
MIT License
11 stars 2 forks source link

Either memoize responses of use a caching library (like `hisel`) to boost performance #14

Open devraj opened 9 months ago

devraj commented 9 months ago

See also hisel built on top of httpx for caching responses. This might be more apt? https://github.com/karpetrosyan/hishel


While implementing a solution for #5 and #8 which both depend on discover of the API endpoints and thus a performance hit on calling the API endpoints unnecessarily, I implement a memoized property for the API endpoint discovery.

This lead me to think if this would be helpful in REST client being able to cache information. To implement this truthfully we would have to:

devraj commented 4 months ago

See also functools package for decorators like cached_property