summaryrefslogtreecommitdiff
path: root/rtslib
diff options
context:
space:
mode:
Diffstat (limited to 'rtslib')
-rw-r--r--rtslib/root.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/rtslib/root.py b/rtslib/root.py
index 6d6b5ee..99a25b7 100644
--- a/rtslib/root.py
+++ b/rtslib/root.py
@@ -25,7 +25,7 @@ import json
from .node import CFSNode
from .target import Target
from .fabric import FabricModule
-from .tcm import so_mapping, StorageObject
+from .tcm import so_mapping, bs_cache, StorageObject
from .utils import RTSLibError, RTSLibALUANotSupported, modprobe, mount_configfs
from .utils import dict_remove, set_attributes
from .alua import ALUATargetPortGroup
@@ -290,6 +290,12 @@ class RTSRoot(CFSNode):
return self.restore(config, clear_existing=clear_existing,
abort_on_error=abort_on_error)
+ def invalidate_caches(self):
+ '''
+ Invalidate any caches used throughout the hierarchy
+ '''
+ bs_cache.clear()
+
targets = property(_list_targets,
doc="Get the list of Target objects.")
tpgs = property(_list_tpgs,