Files
kopia/cli/command_cache_sync.go
Jarek Kowalski a462798b28 content: added blob-level metadata cache (#421)
Unlike regular cache, which caches segments of blobs on a per-content
basis, metadata cache will fetch and store the entire metadata blob (q)
when any of the contents in it is accessed.

Given that there are relatively few metadata blobs compared to data (p)
blobs, this will reduce the traffic to the underlying store and improve
performance of Snapshot GC which only relies on metadata contents.
2020-04-20 02:18:43 -07:00

20 lines
398 B
Go

package cli
import (
"context"
"github.com/kopia/kopia/repo"
)
var (
cacheSyncCommand = cacheCommands.Command("sync", "Synchronizes the metadata cache with blobs in storage")
)
func runCacheSyncCommand(ctx context.Context, rep *repo.DirectRepository) error {
return rep.Content.SyncMetadataCache(ctx)
}
func init() {
cacheSyncCommand.Action(directRepositoryAction(runCacheSyncCommand))
}