Skip to content
  • This is super helpful. Any chance you could add a license to this for anyone using it verbatim?

  • Ok added it

  • In case anyone wants a version that also clears from cached_property declarations on parent classes, use this one instead:

            def invalidate_cached_properties(self):
                for kls in self.__class__.__mro__:
                    for key, value in self.__dict__.items():
                        if isinstance(value, cached_property):
                            self.__dict__.pop(key, None)
    Edited by Cory
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment