asciidoctor.js icon indicating copy to clipboard operation
asciidoctor.js copied to clipboard

resolves #1507 introduce an in-memory cache (Node.js)

Open ggrossetie opened this issue 3 years ago • 2 comments

resolves #1507

ggrossetie avatar Dec 31 '21 19:12 ggrossetie

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()

ggrossetie avatar Dec 31 '21 19:12 ggrossetie

Waiting for a change in Asciidoctor core to properly hook the in-memory cache.

ggrossetie avatar Oct 29 '22 10:10 ggrossetie