Skip to content

[Discussion] Allow for individual cache items to be saved instead of current single-key implementation  #475

Open
@olyop

Description

@olyop

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions