tournesol-app / tournesol

Free and open source code of the https://tournesol.app platform. Meet the community on Discord https://discord.gg/WvcSG55Bf3
https://tournesol.app
Other
321 stars 46 forks source link

[back] optim: make cache table UNLOGGED #1990

Closed amatissart closed 1 week ago

amatissart commented 1 week ago

Description

Configure the cache table in Postgres as UNLOGGED could help to reduce the load on the db, as the API throttles are currently responsible for a lot of queries in the cache.

Find more details about using unlogged table as a cache in PostgreSQL: https://martinheinz.dev/blog/105

An alternative would be to use Redis as a cache instead of PostgreSQL. Possibly more performant, but requires more changes in infra and dev-env.

Checklist