class cached_property:
Decorator that converts a method with a single self argument into a property cached on the instance.
A cached property can be made out of an existing method: (e.g. url = cached_property(get_absolute_url)). The optional name argument is obsolete as of Python 3.6 and will be deprecated in Django 4.0 (#30127).
Static Method | func |
Undocumented |
Method | __get__ |
Call the function and put the return value in instance.__dict__ so that subsequent attribute access on the instance returns the cached value instead of calling cached_property.__get__(). |
Method | __init__ |
Undocumented |
Method | __set​_name__ |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | real​_func |
Undocumented |