asciidoctor.js
asciidoctor.js copied to clipboard
resolves #1507 introduce an in-memory cache (Node.js)
resolves #1507
This pull request provides a custom implement of open-uri/cached.
The implement is heavily inspired by: https://github.com/isaacs/node-lru-cache but does not rely on it (mostly to avoid additional dependencies).
This pull requests also introduces an API to interact with the cache:
Asciidoctor.Cache.enable()
Asciidoctor.Cache.disable()
Asciidoctor.Cache.setMax(500)
Asciidoctor.Cache.reset()
Waiting for a change in Asciidoctor core to properly hook the in-memory cache.