Skip to content

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Dec 7, 2023

Resolves #132

Question is, if a non callback .get() is returning a promise.
I also assumed that if the key has no value it returns undefined.

Before merging it would be good to clear this.

Checklist

@Uzlopak Uzlopak mentioned this pull request Dec 7, 2023
2 tasks
@Uzlopak
Copy link
Contributor Author

Uzlopak commented Dec 7, 2023

Checked...
If key has no value fastify.cache.get will return null
If useAwait for abstractcache is set, we need to return a promise
The return value if existing is an object with the keys: item, ttl and stored.

@Uzlopak Uzlopak requested a review from gurgunday December 7, 2023 16:43
@jsumners
Copy link
Member

jsumners commented Dec 7, 2023

Is there a specific question you need my input on?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Dec 7, 2023

No I tested it and set the types based on the return values
Also sry, i forgot you dont want to review typescript related PRs.

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@Uzlopak Uzlopak merged commit 7ea79e7 into master Dec 7, 2023
@Uzlopak Uzlopak deleted the type-get branch December 7, 2023 19:20
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

Successfully merging this pull request may close these issues.

cache::get returns void in typescript

4 participants