Skip to content

Commit 0b3e28e

Browse files
authored
Update maxSize section in README.md (#107)
1 parent d0dd767 commit 0b3e28e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ setTimeout(() => {
241241

242242
`number`, _defaults to `1`_
243243

244-
The number of values to store in cache, based on a [Least Recently Used](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29) basis. This operates the same as [`maxSize`](https://github.com/planttheidea/moize#maxsize) on `moize`, with the exception of the default being different.
244+
The number of values to store in cache, based on a [Least Recently Used](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29) basis. This operates the same as [`maxSize`](https://github.com/planttheidea/moize#maxsize) on `moize`.
245245

246246
```ts
247247
const manyPossibleArgs = (one: string, two: string) => [one, two];
@@ -259,8 +259,6 @@ console.log(memoized('three', 'four')); // pulled from cache
259259
console.log(memoized('four', 'five')); // ['four', 'five'], drops ['one', 'two'] from cache
260260
```
261261

262-
**NOTE**: The default for `micro-memoize` differs from the default implementation of `moize`. `moize` will store an infinite number of results unless restricted, whereas `micro-memoize` will only store the most recent result. In this way, the default implementation of `micro-memoize` operates more like [`moize.simple`](https://github.com/planttheidea/moize#moizesimple).
263-
264262
### onCacheAdd
265263

266264
`function(cache: Cache, options: Options): void`

0 commit comments

Comments
 (0)