gray-matter
gray-matter copied to clipboard
No mention of cache
trafficstars
There is a part of my code that looks like this:
doc = matter()
doc.content = render(doc.content)
Took awhile to figure out it returns the same object. I don't think gray-matter should keep the object it returns.
this thread helped: https://github.com/jonschlinkert/gray-matter/issues/43#issuecomment-318258919
Passing in empty options object disables caching. This is especially noticeable with many test files containing the same content.
Would, minimally, a PR for the docs be helpful, or a change to make cache keys unique?
I just lost several hours due to this. If there is any caching at all it should be clearly stated in the readme.