https://github.com/howprogrammingworks/memoization
Memoization of synchronous and asynchronous functions
https://github.com/howprogrammingworks/memoization
cache function functional-programming javascript js memoization memoize node nodejs
Last synced: about 2 months ago
JSON representation
Memoization of synchronous and asynchronous functions
- Host: GitHub
- URL: https://github.com/howprogrammingworks/memoization
- Owner: HowProgrammingWorks
- License: mit
- Created: 2016-09-21T23:37:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-06T17:04:58.000Z (over 1 year ago)
- Last Synced: 2023-11-07T01:09:32.799Z (over 1 year ago)
- Topics: cache, function, functional-programming, javascript, js, memoization, memoize, node, nodejs
- Language: JavaScript
- Homepage: https://youtube.com/TimurShemsedinov
- Size: 157 KB
- Stars: 18
- Watchers: 18
- Forks: 25
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## Мемоизация функций: memoize в JavaScript
[](https://www.youtube.com/watch?v=H6S8QJo2Qxg)
Tasks:
- see examples
- implement time expiration cash
- implement memoize with max records count and removing least used
- implement memoize with max total stored data size
- implement universal memoize compatible with both sync and async function
- implement functional object with following properties methods and events:
- `memoized.clear()` - clear cache
- `memoized.add(key, value)` - add value to cach
- `memoized.del(key)` - remove value from cach
- `memoized.get(key)` - returns saved value
- `memoized.timeout: Number` - cache timout
- `memoized.maxSize: Number` - maximum cache size in bytes
- `memoized.maxCount: Number` - maximum cache size in item count
- `memoized.on('add', Function)`
- `memoized.on('del', Function)`
- `memoized.on('clear', Function)`