Added cache options and config.

This commit is contained in:
mikestefanello 2021-12-05 21:56:57 -05:00
parent bccb538d19
commit e499257686
3 changed files with 10 additions and 1 deletions

View file

@ -43,6 +43,10 @@ type CacheConfig struct {
Hostname string `env:"CACHE_HOSTNAME,default=localhost"`
Port uint16 `env:"CACHE_PORT,default=6379"`
Password string `env:"CACHE_PASSWORD"`
MaxAge struct {
StaticFile int `env:"CACHE_MAX_AGE_STATIC_FILE,default=15552000"`
Page int `env:"CACHE_STATIC_FILE_MAX_AGE,default=86400"`
}
}
// GetConfig loads and returns application configuration