mirror of
https://github.com/bitmagnet-io/bitmagnet.git
synced 2026-07-22 04:05:17 -04:00
b560874463
* Increase TTL and cache warmer intervals * Don't delete cache entries prior to no-cache/warm queries
20 lines
293 B
Go
20 lines
293 B
Go
package cache
|
|
|
|
import "time"
|
|
|
|
type Config struct {
|
|
CacheEnabled bool
|
|
EaserEnabled bool
|
|
Ttl time.Duration
|
|
MaxKeys uint
|
|
}
|
|
|
|
func NewDefaultConfig() Config {
|
|
return Config{
|
|
CacheEnabled: true,
|
|
EaserEnabled: true,
|
|
Ttl: time.Minute * 60,
|
|
MaxKeys: 1000,
|
|
}
|
|
}
|