Cache Geo checks for a certain time period instead of per request
Before these checks would always check Redis once per request, and the Redis key had a timeout of 15 seconds. However, this polling can add significant load to the Redis server. Instead, revise the caching strategy instead to the following:
- L1 cache (thead-local, memory store): 1 minute
- L2 cache (Redis): 2 minutes
The downside is cache invalidation: it will take up to 2 minutes for any changes in the Geo nodes to propagate to a secondary.
Relates to gitlab-com/gl-infra/production#928 (closed)
Edited by Stan Hu