Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
docs: update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bxcodec authored Jun 22, 2020
1 parent f1716d8 commit ab33309
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Short example:

// Inject the HTTP Client with httpcache
client := &http.Client{}
_, err := httpcache.NewWithInmemoryCache(client, time.Second*60)
_, err := httpcache.NewWithInmemoryCache(client, true, time.Second*60)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -81,12 +81,21 @@ Example:

```go
client := &http.Client{}
_, err := httpcache.NewWithCustomStorageCache(client, mystorage.NewCustomInMemStorage())
_, err := httpcache.NewWithCustomStorageCache(client,true, mystorage.NewCustomInMemStorage())
if err != nil {
log.Fatal(err)
}
```

### About RFC 7234 Compliance
You can disable/enable the RFC Compliance as you want. If RFC 7234 is too complex for you, you just can disable it by set the RFCComliance parameters to false

```go
_, err := httpcache.NewWithInmemoryCache(client, false, time.Second*60)
// or
_, err := httpcache.NewWithCustomStorageCache(client,false, mystorage.NewCustomInMemStorage())
```

### TODOs
- See the [issues](https://github.com/bxcodec/httpcache/issues)

Expand Down

0 comments on commit ab33309

Please sign in to comment.