Skip to content

Using WeakValueDictionary as a cachestore #1

Description

@vaab

This is a copy of Thomas Kemmer email suggestion::

A last one for today: I only recently came across

https://docs.python.org/3/library/weakref.html

I think WeakValueDictionary makes for a very interesting "standard" cache-like class. Maybe you don't want to replace good old dict as your default, but you should definitely check your decorator works with it, and maybe say so in the docs. Since it's quite a new thing, even seasoned Python programmers may not have heard about it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions