Description
I thought I would open up a discussion as I've seen it discussed here in the past.
Currently this implementation saves the entire cache as a single value. From this I can assume that whenever checking the cache a full read, parse, and search of the entire cache happens. Since it is stored as JSON It must be using JSON.parse and JSON.stringify.
If the cache was provided as a normalized array wouldn't it be much more efficent to read/write only from the cache item that's being used. For instance make use of IndexedDB.
I have no idea if this would actually improve performance significantly or if there wouldn't be a noticable difference as parsing JSON is one of the fastest native functions in Chromium but I'm sure there would be wins in other areas.
Activity