drive: actually cache results on statcache
Updates #11967 Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:

committed by
Percy Wegmann

parent
406293682c
commit
2cf764e998
@ -27,6 +27,10 @@ const (
|
||||
// NewFileSystemForLocal starts serving a filesystem for local clients.
|
||||
// Inbound connections must be handed to HandleConn.
|
||||
func NewFileSystemForLocal(logf logger.Logf) *FileSystemForLocal {
|
||||
return newFileSystemForLocal(logf, &compositedav.StatCache{TTL: statCacheTTL})
|
||||
}
|
||||
|
||||
func newFileSystemForLocal(logf logger.Logf, statCache *compositedav.StatCache) *FileSystemForLocal {
|
||||
if logf == nil {
|
||||
logf = log.Printf
|
||||
}
|
||||
@ -34,7 +38,7 @@ func NewFileSystemForLocal(logf logger.Logf) *FileSystemForLocal {
|
||||
logf: logf,
|
||||
h: &compositedav.Handler{
|
||||
Logf: logf,
|
||||
StatCache: &compositedav.StatCache{TTL: statCacheTTL},
|
||||
StatCache: statCache,
|
||||
},
|
||||
listener: newConnListener(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user