It is possible to use QueueCache, but that implementation has possible data racing issues, not? I see that every "engine" has attributes like "working" (because it stores data about the thing it is working on), and that the engine is "reset" before returning it to the cache. So if parallel requests come in, the same engine is used. Even this line does not really solve the issue.
Why not simply cache the parsed style objects (which are immutable)? Those are the slowest to load.
In that case there is no need for an engine cache, as that complicates matters.
The current version does not cache the parsed csl style objects but loads them on every request.
This is due to the following reasons:
Why not simply cache the parsed style objects (which are immutable)? Those are the slowest to load. In that case there is no need for an engine cache, as that complicates matters.
In short: the caching is done at the wrong place?