Closed juancarlovieri closed 11 months ago
@juancarlovieri
Can you have a look at #133 and maybe give feedback if a fastify.cache.get returns undefined if there is no value for the requested key and if in case without a callback it returns a promise?
Thank you
nevermind. tested
Sorry for the late reply, is it fixed in the PR?
Prerequisites
Fastify version
4.23.2
Plugin version
8.3.0
Node.js version
18.0.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04
Description
When using local cache (e.g.
fastify.cache.set
andfastify.cache.get
),fastify.cache.get
returns void by typescript definition.Steps to Reproduce
Use typescript and run
const res = await fastify.cache.get('something')
res is void according to typescript and will result in compile error.
Expected Behavior
No response