From dd84b9d64fb98746a230cd24233ff50a562c39c9 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Apr 2023 01:36:44 +0800 Subject: --- cli/internal/cache/cache_noop.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cli/internal/cache/cache_noop.go (limited to 'cli/internal/cache/cache_noop.go') diff --git a/cli/internal/cache/cache_noop.go b/cli/internal/cache/cache_noop.go new file mode 100644 index 0000000..80a3c23 --- /dev/null +++ b/cli/internal/cache/cache_noop.go @@ -0,0 +1,23 @@ +package cache + +import "github.com/vercel/turbo/cli/internal/turbopath" + +type noopCache struct{} + +func newNoopCache() *noopCache { + return &noopCache{} +} + +func (c *noopCache) Put(_ turbopath.AbsoluteSystemPath, _ string, _ int, _ []turbopath.AnchoredSystemPath) error { + return nil +} +func (c *noopCache) Fetch(_ turbopath.AbsoluteSystemPath, _ string, _ []string) (ItemStatus, []turbopath.AnchoredSystemPath, int, error) { + return ItemStatus{Local: false, Remote: false}, nil, 0, nil +} +func (c *noopCache) Exists(_ string) ItemStatus { + return ItemStatus{} +} + +func (c *noopCache) Clean(_ turbopath.AbsoluteSystemPath) {} +func (c *noopCache) CleanAll() {} +func (c *noopCache) Shutdown() {} -- cgit v1.2.3-70-g09d2