twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

cache singleton causes memory leak #239

Open dmiddlecamp opened 8 years ago

dmiddlecamp commented 8 years ago

I'm curious to see other's thoughts here, but I am using Hogan.js in a stream processor and found that a recent update caused a memory leak, essentially every string ever processed was held in ram. I eventually tracked this to Hogan.cache.

I'm wondering if this could be a weak linked cache? Or what would people think if this was mentioned in the docs so that anyone else using it in a high-volume environment won't hit the same issue?