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

Commit ab33309

Browse files
authored
docs: update the readme
1 parent f1716d8 commit ab33309

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Short example:
4646

4747
// Inject the HTTP Client with httpcache
4848
client := &http.Client{}
49-
_, err := httpcache.NewWithInmemoryCache(client, time.Second*60)
49+
_, err := httpcache.NewWithInmemoryCache(client, true, time.Second*60)
5050
if err != nil {
5151
log.Fatal(err)
5252
}
@@ -81,12 +81,21 @@ Example:
8181

8282
```go
8383
client := &http.Client{}
84-
_, err := httpcache.NewWithCustomStorageCache(client, mystorage.NewCustomInMemStorage())
84+
_, err := httpcache.NewWithCustomStorageCache(client,true, mystorage.NewCustomInMemStorage())
8585
if err != nil {
8686
log.Fatal(err)
8787
}
8888
```
8989

90+
### About RFC 7234 Compliance
91+
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
92+
93+
```go
94+
_, err := httpcache.NewWithInmemoryCache(client, false, time.Second*60)
95+
// or
96+
_, err := httpcache.NewWithCustomStorageCache(client,false, mystorage.NewCustomInMemStorage())
97+
```
98+
9099
### TODOs
91100
- See the [issues](https://github.com/bxcodec/httpcache/issues)
92101

0 commit comments

Comments
 (0)