项目作者: HowProgrammingWorks

项目描述 :
Memoization of synchronous and asynchronous functions
高级语言: JavaScript
项目地址: git://github.com/HowProgrammingWorks/Memoization.git
创建时间: 2016-09-21T23:37:52Z
项目社区:https://github.com/HowProgrammingWorks/Memoization

开源协议:MIT License

下载


Мемоизация функций: memoize в JavaScript

Мемоизация функций: memoize в JavaScript

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)