Add distributed locks to specific methods

This commit is contained in:
Jacob Gunther
2023-07-22 01:29:19 -05:00
parent 34c3156cc5
commit 55fd9f7bb4
6 changed files with 214 additions and 29 deletions

View File

@@ -77,6 +77,7 @@ var (
Cache: CacheConfig{
SkinCacheDuration: PointerOf(time.Hour * 12),
RenderCacheDuration: PointerOf(time.Hour * 12),
EnableLocks: true,
},
}
)
@@ -125,6 +126,7 @@ type RedisConfig struct {
type CacheConfig struct {
SkinCacheDuration *time.Duration `yaml:"skin_cache_duration"`
RenderCacheDuration *time.Duration `yaml:"render_cache_duration"`
EnableLocks bool `yaml:"enable_locks"`
}
// ReadFile reads the configuration from the file and parses it as YAML.