Skip to content

Commit b4cfac6

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
Improve README
1 parent 4417f4a commit b4cfac6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Stupid fast in-memory Go cache with optional L2 persistence layer.
1212

13-
Designed to persistently caching API requests in an unreliable environment, this cache has something for everyone.
13+
Designed for persistently caching API requests in an unreliable environment, this cache has something for everyone.
1414

1515
## Features
1616

@@ -35,7 +35,7 @@ import "github.com/codeGROOVE-dev/sfcache"
3535

3636
// strings as keys, ints as values
3737
cache := sfcache.Memory[string, int]()
38-
cache.Set("answer", 42, 0)
38+
cache.Set("answer", 42)
3939
val, found := cache.Get("answer")
4040
```
4141

@@ -50,8 +50,8 @@ import (
5050
p, _ := localfs.New[string, User]("myapp", "")
5151
cache, _ := sfcache.Persistent[string, User](ctx, p)
5252

53-
cache.SetAsync(ctx, "user:123", user, 0) // Don't wait for the key to persist
54-
cache.Store.Len(ctx) // Access persistence layer directly
53+
cache.SetAsync(ctx, "user:123", user) // Don't wait for the key to persist
54+
cache.Store.Len(ctx) // Access persistence layer directly
5555
```
5656

5757
A persistent cache suitable for Cloud Run or local development; uses Cloud Datastore if available

0 commit comments

Comments
 (0)