skbio.tree.TreeNode.invalidate_caches#

TreeNode.invalidate_caches(attr=True, lookup=True)[source]#

Delete node attribute and lookup caches of a tree.

Changed in version 0.6.3: Renamed from invalidate_caches. The old name is preserved as an alias. But it may be removed in a future version.

Parameters:
attrbool or str, optional

Whether to delete attribute caches created by cache_attr (default: True). One may instead provide an attribute name such that only this attribute will be deleted.

Changed in version 0.6.3: Can provide a specific attribute name.

lookupbool, optional

Whether to delete lookup caches created during name searching (default: True).

Added in version 0.6.3.

Notes

This method may be called from any node within a tree. The caches, which were attached to the root node of the tree, will be deleted.

This method will silently skip if the specified caches do not exist.