Adds KV-based caching to Aloglia index calls, with the aim to reduce the number of calls we're actually making to Algolia by caching results for each unique query in KV for 15 minutes at a time.
TODO:
Is 15 minutes a good expiration for the cached results?
Production KV namespace needs to be created
What are the acceptance criteria?
Repeat calls to the libraries endpoint with identical queries will rely on cached results for 15 minutes, instead of making API calls to Aloglia every time.
Identical requests with query params in a different order, or a fields list containing the same values but in a different order, will be normalized and share the same cached results.
Type of Change
What issue does this relate to?
N/A
What should this PR do?
Adds KV-based caching to Aloglia index calls, with the aim to reduce the number of calls we're actually making to Algolia by caching results for each unique query in KV for 15 minutes at a time.
TODO:
What are the acceptance criteria?
Repeat calls to the libraries endpoint with identical queries will rely on cached results for 15 minutes, instead of making API calls to Aloglia every time.
Identical requests with query params in a different order, or a fields list containing the same values but in a different order, will be normalized and share the same cached results.