mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
webdav: fix caching with external auth/plugins
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -85,6 +85,13 @@ type UsersCacheConfig struct {
|
||||
MaxSize int `json:"max_size" mapstructure:"max_size"`
|
||||
}
|
||||
|
||||
func (c *UsersCacheConfig) getExpirationTime() time.Time {
|
||||
if c.ExpirationTime > 0 {
|
||||
return time.Now().Add(time.Duration(c.ExpirationTime) * time.Minute)
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
// MimeCacheConfig defines the cache configuration for mime types
|
||||
type MimeCacheConfig struct {
|
||||
Enabled bool `json:"enabled" mapstructure:"enabled"`
|
||||
|
||||
Reference in New Issue
Block a user