prismicio / javascript-kit

Development kit for the Javascript language
https://developers.prismic.io
106 stars 69 forks source link

Cache does not limit number of items #157

Open adbutterfield opened 7 years ago

adbutterfield commented 7 years ago

We noticed that there isn't a limit set on the max number of items in the cache, and also no way to set a limit.

In /lib/cache.js the constructor for ApiCache takes a limit argument, but when the constructor is invoked on line 869 of /lib/api.js no limit is passed.

Also, there is no default number of items set in /lib/lru.js.