Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
HDegroote committed Jul 4, 2024
1 parent 62d4ccb commit ee57788
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ cache3.set('some', 'thing')
console.log('cached:', cache.get('key')) // 'value'
// But they share the same global size
console.log(cache.globalSize, 'of', cache.globalSize) // 3 of 3
console.log(cache.globalSize, 'of', cache.maxSize) // 3 of 3
cache.set('key2', 'another value')
// The cache was full, so one of the existing 3 entries got evicted
console.log(cache.globalSize, 'of', cache.globalSize) // 3 of 3
console.log(cache.globalSize, 'of', cache.maxSize) // 3 of 3
```

## API
Expand Down
4 changes: 2 additions & 2 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ cache3.set('some', 'thing')
console.log('cached:', cache.get('key')) // 'value'

// But they share the same global size
console.log(cache.globalSize, 'of', cache.globalSize) // 3 of 3
console.log(cache.globalSize, 'of', cache.maxSize) // 3 of 3

cache.set('key2', 'another value')
// The cache was full, so one of the existing 3 entries got evicted

console.log(cache.globalSize, 'of', cache.globalSize) // 3 of 3
console.log(cache.globalSize, 'of', cache.maxSize) // 3 of 3

0 comments on commit ee57788

Please sign in to comment.