Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
canhlinh committed Mar 16, 2023
1 parent 1cd5b99 commit cbb3077
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"bytes"
"io"
"time"
"github.com/mobile-health/filecache"
)
Expand All @@ -28,7 +29,13 @@ func sampleReader(s string) io.Reader {
}
func main() {
fc := filecache.New(filecache.Config{TempDir: "tmp"}, nil)
fc := filecache.New(filecache.Config{
BaseDir: "filecache",
TempDir: "tmp",
MaxTTL: 60 * time.Second,
MaxSize: 10 * 1024 * 1024,
CleanupInterval: 10 * time.Second,
}, nil)
defer fc.Empty()
fc.RunGC()
Expand Down

0 comments on commit cbb3077

Please sign in to comment.