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

Key type #16

Closed
brainsiq opened this issue Oct 29, 2014 · 3 comments
Closed

Key type #16

brainsiq opened this issue Oct 29, 2014 · 3 comments
Assignees
Labels

Comments

@brainsiq
Copy link

Is it intentional that it has to be string? It's not mentioned in the docs but couldn't get the cache to work with an integer key.

@varunpatro
Copy link

^bump

@mpneuried mpneuried self-assigned this Feb 8, 2016
@mpneuried
Copy link
Contributor

Hi, internally the key is used as an object key.

The data object will look like:

data = {
  "yourkey": {
    "v": "the cached value",
    "t": 0 // the ttl
  }
}

This is the reason why a integer is not possible.
I created a separate Issue to validate the key's type.

Also see this code position

I hope this helps ;-)

@mpneuried
Copy link
Contributor

Will be fixed by #48

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

No branches or pull requests

3 participants