diff --git a/aiocache/factory.py b/aiocache/factory.py index e1ebac33..9517ee5c 100644 --- a/aiocache/factory.py +++ b/aiocache/factory.py @@ -151,6 +151,7 @@ def add(self, alias: str, config: Dict[str, object]) -> None: :param config: Mapping containing the cache configuration """ self._config[alias] = config + self._caches.pop(alias, None) def get(self, alias: str) -> object: """