single |
===============================
cached-property
===============================
:alt: Code style: black
A decorator for caching properties in classes.
Why?
-----
* Makes caching of time or computational expensive properties quick and
easy.
* Because I got tired of copy/pasting this code from non-web project to
non-web project.
* I needed something really simple that worked in Python 2 and 3.
How to use it
--------------
Let's define a class with an expensive property. Every time you stay there
the
price goes up by $50!
Django Crash Course for Django 3.0 and Python 3.8 is the best cheese-themed
Django reference in the universe!
History
-------
1.5.2 (2020-09-21)
++++++++++++++++++
* Add formal support for Python 3.8
* Remove formal support for Python 3.4
* Switch from Travis to GitHub actions
* Made tests pass flake8 for Python 2.7
1.5.1 (2018-08-05)
++++++++++++++++++
* Added formal support for Python 3.7
* Removed formal support for Python 3.3
1.4.3 (2018-06-14)
+++++++++++++++++++
* Catch SyntaxError from asyncio import on older versions of Python, thanks
to @asottile
1.4.2 (2018-04-08)
++++++++++++++++++
* Really fixed tests, thanks to @pydanny
1.4.1 (2018-04-08)
++++++++++++++++++
* Added conftest.py to manifest so tests work properly off the tarball,
thanks to @dotlambda
* Ensured new asyncio tests didn't break Python 2.7 builds on Debian,
thanks to @pydanny
* Code formatting via black, thanks to @pydanny and @ambv
1.4.0 (2018-02-25)
++++++++++++++++++
* Added asyncio support, thanks to @vbraun
* Remove Python 2.6 support, whose end of life was 5 years ago, thanks to
@pydanny
1.3.1 (2017-09-21)
++++++++++++++++++
* Validate for Python 3.6
1.3.0 (2015-11-24)
++++++++++++++++++
* Drop some non-ASCII characters from HISTORY.rst, thanks to @AdamWill
* Added official support for Python 3.5, thanks to @pydanny and @audreyr
* Removed confusingly placed lock from example, thanks to @ionelmc
* Corrected invalidation cache documentation, thanks to @proofit404
* Updated to latest Travis-CI environment, thanks to @audreyr
1.2.0 (2015-04-28)
++++++++++++++++++
* Overall code and test refactoring, thanks to @gsakkis
* Allow the del statement for resetting cached properties with ttl instead
of del obj._cache[attr], thanks to @gsakkis.
* Uncovered a bug in PyPy,
https://bitbucket.org/pypy/pypy/issue/2033/attributeerror-object-attribute-is-read,
thanks to @gsakkis
* Fixed threaded_cached_property_with_ttl to actually be thread-safe,
thanks to @gsakkis
1.1.0 (2015-04-04)
++++++++++++++++++
|