hapijs / catbox

Multi-strategy object caching service
Other
494 stars 72 forks source link

Timeout with pendingGenerateTimeout period over cache expiration #184

Closed adrien-k closed 7 years ago

adrien-k commented 7 years ago

Description

If the cache expires while a pendingGenerateTimeout period is running without any "pending response", consecutive get() within the period result in timeouts.

Related to issue #177

Solution

Here we force re-generating a value for those consecutive get() that would be lost otherwise but it's not ideal as it ignores the initial purpose of pendingGenerateTimeout option...

Any thoughts for a better option ?

kanongil commented 7 years ago

Thanks for this PR, which adresses a serious issue.

I don't think that it is the correct way to solve it, so I have made my own attempt in #185, incorporating your test. Let me know what you think about it?

adrien-k commented 7 years ago

@kanongil thank your for the proper fix, it looks good to me!

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.