From d77f6f4ba76884e8f29288d1a9ff414ef4b0d206 Mon Sep 17 00:00:00 2001 From: Jody Donetti Date: Sat, 20 Jan 2024 13:50:50 +0100 Subject: [PATCH] Update FailSafe.md --- docs/FailSafe.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/FailSafe.md b/docs/FailSafe.md index 66e0f4a4..083cb967 100644 --- a/docs/FailSafe.md +++ b/docs/FailSafe.md @@ -12,7 +12,7 @@ That's ok in most situations, and is the tradeoff we accept to obtain better per Setting an **expiration** to a cache entry is also good thing: it prevents us from using a piece of data for too long, giving us the ability to refresh the value from its source - say, a database - after some time. -Sometimes though when the entry **expires** and we go get an updated value from the database, things **may go bad**: the database may be totally down or overloaded, there may be temporary network congestion or really anything else bad that can happen. +Sometimes though when the entry **expires** and we go get an updated value from the database, things **may go bad**: the database may be totally down or overloaded, there may be temporary network congestion or really anything else bad that can happen, and this will result in the factory throwing an exception. In these cases what happens is your service will be down or super slow, like this: @@ -24,7 +24,7 @@ Wouldn't it be nice to have a way to keep using a stale value for a little longe This is exactly what the **Fail-Safe** mechanism does. -It allows us to specify for how long each entry should be kept around in case of problems, while at the same time let them *logically* expire at the right time, all while letting us re-use them in case of an unexpected problem that would normally result in an exception. +It allows us to specify for how long each entry should be kept around after it expired in case of problems (that is, when the factory throws an exception) while at the same time let them *logically* expire at the right time, all while letting us re-use them in case of an unexpected problem that would normally result in the factory exception bubbling up to our calling code. To do that we have to simply set 3 things on a `FusionCacheEntryOptions` object: