Skip to content

Commit 20c0471

Browse files
committed
polish
1 parent 6cb350a commit 20c0471

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ package main
1414

1515
import (
1616
"fmt"
17-
cache "github.com/mkelcik/memory-cache"
17+
mcache "github.com/mkelcik/memory-cache"
1818
"time"
1919
)
2020

@@ -28,7 +28,7 @@ func main() {
2828
// if second parameter is true, cache is limited to this size, if false the cache can grow beyond this capacity
2929
// third parameter is ttl duration for records, if is set to 0 the cache items never expire
3030
// last parameter is GC interval in seconds, if set to 0, GC will never start automatically
31-
cache := cache.NewCache[int, CacheValue](100, false, 60 * time.Second, 120 * time.Second)
31+
cache := mcache.NewCache[int, CacheValue](100, false, 60 * time.Second, 120 * time.Second)
3232

3333
// set data to cache
3434
for i := 1; i <= 100; i++ {

example/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module example
2+
23
go 1.21.0
34

5+
require github.com/mkelcik/memory-cache v0.1.3

example/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
gitbucket.home/michal/memory-cache v0.0.0-20230922221623-51b0cbca207a h1:7avEA5sFMpVPHnMy3sOML0QjHalWQbue+sFZ9H5JFUs=
2-
gitbucket.home/michal/memory-cache v0.0.0-20230922221623-51b0cbca207a/go.mod h1:rnD5JPgv+caYkP7Hb3HR9mXapis5n8S00F2Q8r/7fP4=
1+
github.com/mkelcik/memory-cache v0.1.3 h1:H+m86fKMFd726Czq5GMRZg2ufOPFf3ZWTMRg5WI1Kd0=
2+
github.com/mkelcik/memory-cache v0.1.3/go.mod h1:3M+bUtlbjtukHL77YuMK+NLT+xszB37rnyA4gN97RTI=

0 commit comments

Comments
 (0)