One of the most common strategies to improve performances of web applications is the use of caching. siibra-api can be configured to use a gzipped b64 redis store to cache responses, used in fastapi middleware
flowchart TD Internet RespCache[Cache database] OpenshiftServer[Server Pod] Internet --> |queries| OpenshiftServer OpenshiftServer --> |caches| RespCache RespCache --> |provides cache| OpenshiftServer OpenshiftServer --> |responds| Internet
The redis store is designed to store key (gzipped base64 encoded) value. Whilst incur performance cost on read and on write, the advantage of such approach was the non-trivial improvement of resource efficiency.
The caching criteria can be found in the fastapi middleware.
In short, a response will be cached if and only if:
- HTTP verb is
- auth header not provided and
- url.path does not contain banned keywords (
- url.query does not contain banned keywords (
- response is of type