sounisi5011/metalsmith-netlify-published-date

Cache read / write speedup

Opened this issue · 0 comments

Cache data is stored in files using flat-cache.

https://github.com/sounisi5011/metalsmith-netlify-published-date/blob/74136db05065dbf5e97c89d45d3cdcc498acd37c/src/cache/preview.ts

The format of the cache data is JSON. For this reason, special conversion processing is performed to store Buffer in JSON. This is a problem caused by using JSON, and is a useless conversion.

Also, since all cache data needs to be parsed, the processing speed will be reduced if the cache becomes too large.

There are two problems to solve:


References: