hapijs / catbox

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

staleTimeout for first request should returns null if no data at timeout time #68

Closed rockbot closed 10 years ago

rockbot commented 10 years ago

Right now, with staleTimeout, if it takes a ridiculously long time to get data (which will be added to the cache after it's been loaded) on the very first request, the whole process blocks until that data is loaded. Once it's stored in the cache, of course everything is fine.

I'd really love to have a situation where even if there's no data, the cache returns null after a designated timeout, but then continues to load in the background. This way we can keep the user moving with slightly less data and then show the data when it finally arrives.

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.