Skip to content

Commit 9799dfc

Browse files
author
root
committed
first commit
1 parent 63ac305 commit 9799dfc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
![Version](https://img.shields.io/github/release/optimalisatie/cache-api-keyval-store.svg)
22

3-
# Cache API Key/Value store
3+
# Cache API Key/Value Store
44

5-
Fast and efficient key/value store with +50MB storage capacity in [most browsers](https://developer.mozilla.org/en-US/docs/Web/API/Cache#Browser_compatibility), expiration and JSON object data-type.
5+
Fast and tiny key/value store with +50MB storage capacity in [most browsers](https://developer.mozilla.org/en-US/docs/Web/API/Cache#Browser_compatibility), expiration and JSON object data-type.
66

7-
It’s currently available in Chrome >= 40, Firefox >=39 and Opera >= 27.
7+
Cache API is currently available in Chrome >= 40, Firefox >=39 and Opera >= 27.
88

99
Safari and Edge recently introduced support for it.
1010

@@ -33,7 +33,7 @@ if (db.supported) { // Cache API supported by browser
3333
3434
// get data from cache
3535
db.get('key').then(function(json) {
36-
console.log('json cache data', json);
36+
console.log('json object', json);
3737
});
3838
3939
// prune expired cache entries
@@ -45,11 +45,10 @@ if (db.supported) { // Cache API supported by browser
4545

4646
## Fallback storage
4747

48-
To enable a fallback storage for browsers that do not support Cache API, you can define a constructor on global variable `CacheApiDBFallback`. The constructor needs to provide 4 methods: `set`, `get`, `del` and `prune`.
48+
To enable a fallback storage for browsers that do not yet support Cache API, you can define a constructor on global variable `CacheApiDBFallback`. The constructor needs to provide 4 methods: `set`, `get`, `del` and `prune`.
4949

5050
```js
5151
window.CacheApiDBFallback = function(store, options) {
52-
5352
this.get = function(key) { /* return key from store */ }
5453
this.set = function(key,data,expire) { /* set key in store */ }
5554
this.det = function(key) { /* delete key from store */ }

0 commit comments

Comments
 (0)