Skip to content

Commit

Permalink
Fix #47: Document deprecated @cachedmethod default behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Sep 7, 2015
1 parent 5c7effc commit 068ed52
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ often called with the same arguments::
peps = CachedPEPs(cachesize=10)
print("PEP #1: %s" % peps.get(1))

For backwards compatibility, the default key function used by
:func:`cachedmethod` will generate distinct keys for different
methods to ease using a shared cache with multiple methods. This
has been deprecated, and relying on this feature is strongly
discouraged. When using a shared cache, distinct key functions
should be used, as with the :func:`cached` decorator.

.. versionadded:: 1.1

The optional `key` and `lock` parameters.
Expand All @@ -295,6 +302,11 @@ often called with the same arguments::

The `typed` argument. Use ``key=typedkey`` instead.

.. deprecated:: 1.1

When using a shared cached for multiple methods, distinct key
function should be used.

.. deprecated:: 1.1

The wrapper function's :attr:`cache` attribute. Use the
Expand Down

0 comments on commit 068ed52

Please sign in to comment.