propcache is a Python library that provides accelerated implementations of cached properties, enhancing performance for property caching in Python 3.9 and above. The current version is 0.4.1, with a release cadence that includes regular updates and bug fixes.
pip install propcacheVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use propcache's cached_property to cache the result of an expensive computation in a class property.
Upgrade to version 0.4.1 or later, where the issue has been resolved.
Ensure that self._cache is correctly initialized and managed within your class when using under_cached_property.
Address pip warnings if necessary, but this is not a library-specific failure.
Run `pip install propcache` to install the library.
If you need to re-evaluate the property, delete the cached attribute from the instance's dictionary (e.g., `del self.__dict__['my_property']`) or the dedicated cache (`del self._cache['my_property']` for `under_cached_property`), and then access the property again. Do not attempt to assign to it directly.
Install the required C/C++ build tools. On Windows, download and install 'Microsoft C++ Build Tools' from the provided link. On Linux, ensure `gcc` and Python development headers (e.g., `python3-dev` or `python-devel`) are installed. Alternatively, you can force a slower pure-Python installation by running `pip install propcache --config-settings=pure-python=true` or setting the environment variable `PROPCACHE_NO_EXTENSIONS=1` before installation.
No dependency data recorded yet.