Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache key length limit #107

Open
dongmei761 opened this issue Nov 22, 2018 · 1 comment
Open

cache key length limit #107

dongmei761 opened this issue Nov 22, 2018 · 1 comment

Comments

@dongmei761
Copy link

dongmei761 commented Nov 22, 2018

I'm wondering if the cache key has a length limit? Is it the same with the length limit of String on V8? Will these long keys impact the performance?

@danielway
Copy link

Hi there @dongmei761.

It seems that your guess is correct; key length will be limited by string sizes for the environment. The standard answer is 2^27 characters. [1]

Regarding performance impacts, once again there are differences environment-to-environment. It seems most browsers will place keys into a hash-table making their lookup efficient and not dependent on key length. [2]

References:
[1] https://stackoverflow.com/a/28841863
[2] https://stackoverflow.com/a/13940271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants