mirror of
https://github.com/rclone/rclone.git
synced 2025-01-10 16:28:30 +01:00
vfs: fill and clean the cache immediately on startup
This commit is contained in:
parent
3f8d286a75
commit
295c3fabec
@ -387,6 +387,9 @@ func (c *cache) clean() {
|
|||||||
//
|
//
|
||||||
// doesn't return until context is cancelled
|
// doesn't return until context is cancelled
|
||||||
func (c *cache) cleaner(ctx context.Context) {
|
func (c *cache) cleaner(ctx context.Context) {
|
||||||
|
// Start cleaning the cache immediately
|
||||||
|
c.clean()
|
||||||
|
// Then every interval specified
|
||||||
timer := time.NewTicker(c.opt.CachePollInterval)
|
timer := time.NewTicker(c.opt.CachePollInterval)
|
||||||
defer timer.Stop()
|
defer timer.Stop()
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user