This PR introduces optimization on the /random endpoint.
closes #111
It optimizes database queries by caching the total count of records
for different variations of the query. Instead of querying the database
multiple times to get the total count, the cache is used to quickly
retrieve the count, reducing unnecessary database roundtrips.
This PR introduces optimization on the
/random
endpoint. closes #111It optimizes database queries by caching the total count of records for different variations of the query. Instead of querying the database multiple times to get the total count, the cache is used to quickly retrieve the count, reducing unnecessary database roundtrips.