Open vlio20 opened 1 year ago
@tripodsgames , as I see it hot cache and a cache with TTL shouldn't work together. What do you think of creating a hot cache that can later be provided as an argument to the decorator?
Hi, sorry for not replying sooner, I actually wanted to implement a cache that expires, but continues to serve expired data while fetching new data in the background. I think a better name would be "prefetch" or a combination of two properties like "prefetch" + "lazy" instead of "hot cache"
I think that I understand the purpose. Please notice that your PR is currently failing.
@tripodsgames: I want to implement a hot cache functionality into the memoizeAsyncify, i want your opinion on this implementation. WORK IN PROGRESS.
Details: Hot cache system always keeps the cache available When the cache expires the function linked to it is called automatically, during this call the old cache is served until the new value is received. That way, only on the first call or in case of failures the memoizeAsyncify would have some delay