Closed crazyjin closed 5 years ago
Use cache_prefix to increment version to clear cache.
class Setting
cache_prefix { "v1" }
end
Use cache_prefix to increment version to clear cache.
class Setting cache_prefix { "v1" } end
I am facing the same issue. Happens randomly every couple of days. Do you mean that I should increment the cache prefix on every new launch of the Rails application?
If so, I guess it is better to set the cache_prefix
dynamically to a unique and new GUID
when the application starts.
Application just use the old values in the cache. It a better idea to clear or update configuration values in cache every time just after rails-settings-cached loads a yml.