Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

ADR 11 (Question Cache)

Manueluz edited this page Apr 2, 2024 · 1 revision

ADR 11 (Question Cache)

Decision

We will use a cache (In MongoDB) to store the a number of pre-generated questions so that the response times of the application are low and the UX isnt affected by the slow response times of the WikiData SPARQL API.

The cache will store 1000 questions at any time, once the initial 1000 questions are reached each 24 Hours the 100 oldest questions are purged from the cache and new 100 questions are loaded, this is done to prevent stale data in the cache.

Status

Accepted.

Consequences

Our questions now load way faster than before.

Risks

We are creating additional complexity when creating the cache, moreover we also run into the risk of having outdated data in the cache.