Skip to content
Snippets Groups Projects

redis: Tune settings for `cache` and `store`

Created by: tsenart

This commit reverts the part of #8114 that made redis-cache not persistent. Sourcegraph cannot work well with a cold cache, so we need to persist this cached data to prevent cold starts (e.g. for GitHub and GitLab cached user permissions).

It also tunes Redis settings specifically for cache and store to match what we have in the kubernetes deployments:

  • store: We change the maxmemory-policy setting to noeviction.
  • cache: Since it's ephemeral, we don't use AOF persistence, but reduce the RDB snapshot interval to 60 seconds — this means we have a data loss window of 1 minute, which should be fine for cache, specially since persistence only optimizes the cold cache scenario.

Merge request reports

Approval is optional

Merged by avatar (Sep 19, 2025 12:28am UTC)

Merge details

  • Changes merged into master with 24c92c87.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #8235 into master will decrease coverage by <.01%. The diff coverage is 0%.

    @@            Coverage Diff             @@
    ##           master    #8235      +/-   ##
    ==========================================
    - Coverage   40.64%   40.64%   -0.01%     
    ==========================================
      Files        1289     1289              
      Lines       67697    67698       +1     
      Branches     6321     6321              
    ==========================================
      Hits        27516    27516              
    - Misses      37614    37615       +1     
      Partials     2567     2567
    Impacted Files Coverage Δ
    internal/redispool/redispool.go 47.36% <ø> (ø) :arrow_up:
    cmd/server/shared/redis.go 26.02% <0%> (-0.37%) :arrow_down:
Please register or sign in to reply
Loading