summaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorPhil Davis <phil@jankaritech.com>2020-12-16 16:56:32 +0545
committerGitHub <noreply@github.com>2020-12-16 12:11:32 +0100
commit04b89857e104ac7dcbf9fc65d8d4f1a1178123e6 (patch)
tree585bf761f0a1cfc69dffcd8afd22e94ca9da7c07 /cache
parent21fa1e86f2aa929fb0983a0cc3dc4e271ea1cc54 (diff)
all: Fix minor typos
Diffstat (limited to 'cache')
-rw-r--r--cache/filecache/filecache.go2
-rw-r--r--cache/namedmemcache/named_cache.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cache/filecache/filecache.go b/cache/filecache/filecache.go
index c586f9a51..ffb0895b0 100644
--- a/cache/filecache/filecache.go
+++ b/cache/filecache/filecache.go
@@ -221,7 +221,7 @@ func (c *Cache) GetOrCreateBytes(id string, create func() ([]byte, error)) (Item
return info, b, nil
}
-// GetBytes gets the file content with the given id from the cahce, nil if none found.
+// GetBytes gets the file content with the given id from the cache, nil if none found.
func (c *Cache) GetBytes(id string) (ItemInfo, []byte, error) {
id = cleanID(id)
diff --git a/cache/namedmemcache/named_cache.go b/cache/namedmemcache/named_cache.go
index d67bcc28a..4e912bf58 100644
--- a/cache/namedmemcache/named_cache.go
+++ b/cache/namedmemcache/named_cache.go
@@ -54,7 +54,7 @@ func (c *Cache) Clear() {
// GetOrCreate tries to get the value with the given cache key, if not found
// create will be called and cached.
// This method is thread safe. It also guarantees that the create func for a given
-// key is invoced only once for this cache.
+// key is invoked only once for this cache.
func (c *Cache) GetOrCreate(key string, create func() (interface{}, error)) (interface{}, error) {
c.mu.RLock()
entry, found := c.cache[key]