From 72333e3c4e74c8b9b926d8a02ce7136573cf1995 Mon Sep 17 00:00:00 2001 From: Andreas Holstenson Date: Thu, 4 Apr 2019 18:50:31 +0200 Subject: [PATCH] docs: Updating README with RemovalReason instead of RemovalCause --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 274e0a0..8b0d77a 100644 --- a/README.md +++ b/README.md @@ -253,20 +253,20 @@ Caches support a single removal listener that will be notified when items in the cache are removed. ```javascript -import { RemovalCause } from 'transitory'; +import { RemovalReason } from 'transitory'; const cache = newCache() .withRemovalListener((key, value, reason) => { switch(reason) { - case RemovalCause.EXPLICIT: + case RemovalReason.EXPLICIT: // The user of the cache requested something to be removed break; - case RemovalCause.REPLACED: + case RemovalReason.REPLACED: // A new value was loaded and this value was replaced break; - case RemovalCause.SIZE: + case RemovalReason.SIZE: // A value was evicted from the cache because the max size has been reached break; - case RemovalCause.EXPIRED: + case RemovalReason.EXPIRED: // A value was removed because it expired due to its max age break; }