Use git commit hash as part of the cache key
avoids issues with model caching being incompatible across versions
This commit is contained in:
parent
633d175146
commit
9e87a069bd
|
@ -24,7 +24,7 @@ setup_redis_env_url
|
||||||
setup_redis_env_url(:cache, false)
|
setup_redis_env_url(:cache, false)
|
||||||
|
|
||||||
namespace = ENV.fetch('REDIS_NAMESPACE', nil)
|
namespace = ENV.fetch('REDIS_NAMESPACE', nil)
|
||||||
cache_namespace = namespace ? namespace + '_cache' : 'cache'
|
cache_namespace = [namespace, 'cache', `git rev-parse --short HEAD`.strip].compact.join('_')
|
||||||
|
|
||||||
REDIS_CACHE_PARAMS = {
|
REDIS_CACHE_PARAMS = {
|
||||||
expires_in: 10.minutes,
|
expires_in: 10.minutes,
|
||||||
|
|
Loading…
Reference in New Issue