-
-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Description
Thanks for an excellent project.
We have a long running nodejs application which is parsing templates that can be up to 3MB. As you can imagine, the parsing/tokenising stages can take a while. We can turn cache: true on in the options, but eventually it eats all our memory.
We also tried to do a parse call which gives us an ITemplate[], which we cache ourselves until we need to render it. This works quite well, but we are still consuming a LOT of memory. A 40KB template is using about 1.2MB in our cache.
So I guess there are two requests here;
- could we have a max entries in the cache? So it evicts the oldest? like an LRU cache?
- Is there a way we could serialise the parsed/tokenised template to json or something, ie. no complex objects