Skip to main content
`Ctrl`+`K`

# skbio.tree.TreeNode.clear_caches

TreeNode.clear_caches(attr=True, lookup=True)

  Delete node attribute and lookup caches of a tree.

  Changed in version 0.6.3: Renamed from `invalidate_caches`. The old name is kept as an alias but is deprecated.

  Parameters:
    attr bool 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.

    lookup bool, optional

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

      Added in version 0.6.3.

  See also

  `has_caches`
  `cache_attr`
  `find`

  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.