lonelyenvoy / python-memoization

A powerful caching library for Python, with TTL support and multiple algorithm options.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use lru_dict?

nbecker opened this issue · comments

You write:

    :param max_items: The max items can be held in memoization cache
                      * NOT RECOMMENDED *
                      This argument, if given, can dramatically slow down the performance.

Would it be better to use lru-dict?

Sorry for replying so late 'cause I didn't pay enough attention to this project.

Yes, it's true. Actually, functools.lru_cache provided in Python 3.2+ has a better performance than my library, so I suggest you use it instead. For references, this is the official documentation for lru_cache at python.org.

I will fix this issue within a few days and add some features to make this lib useful.

Thanks,

Resolved in v0.1.4. Now available at PyPI or GitHub Releases.