Set SCCACHE_REDIS
to a Redis url in format redis://[:<passwd>@]<hostname>[:port][/<db>]
to store the cache in a Redis instance. Redis can be configured as a LRU (least recently used) cache with a fixed maximum cache size. Set maxmemory
and maxmemory-policy
according to the Redis documentation. The allkeys-lru
policy which discards the least recently accessed or modified key fits well for the sccache use case.
Redis over TLS is supported. Use the rediss://
url scheme (note rediss
vs redis
). Append #insecure
the the url to disable hostname verification and accept self-signed certificates (dangerous!). Note that this also disables SNI.