Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.75 KB

README.rst

File metadata and controls

50 lines (34 loc) · 1.75 KB

zope.cachedescriptors

Latest release Supported Python versions Documentation Status https://coveralls.io/repos/github/zopefoundation/zope.cachedescriptors/badge.svg?branch=master

Cached descriptors cache their output. They take into account instance attributes that they depend on, so when the instance attributes change, the descriptors will change the values they return.

Cached descriptors cache their data in _v_ attributes, so they are also useful for managing the computation of volatile attributes for persistent objects.

Persistent descriptors:

  • property

    A simple computed property.

    See src/zope/cachedescriptors/property.rst.

  • method

    Idempotent method. The return values are cached based on method arguments and on any instance attributes that the methods are defined to depend on.

    Note

    Only a cache based on arguments has been implemented so far.

    See src/zope/cachedescriptors/method.rst.