Skip to content

Big Update v2.0.0

Choose a tag to compare

@awolverp awolverp released this 09 Mar 12:28
· 530 commits to main since this release

In this release, I rewritten all implemetations, documentation, and stub-file.

Added

  • New .drain(n) method: According to cache algorithm, deletes and returns n items from cache.
  • New .shrink_to_fit() method: Shrinks the capacity of the cache as much as possible.

Removed

  • The MRUCache removed.

Changed

  • __new__ methods changed; Now you can insert items to caches when creating those.
  • TTLCacheNoDefault name changed to VTTLCache.
  • __iter__, keys, values and items methods now are iterable.
  • LFUCache sorting algorithm changed to improve speed.
  • __eq__ and __ne__ methods changed.
  • cached decorator parameter clear_reuse default value from True changed to False.

Deprecated

  • .delete() methods are deprecated; use del cache[key] instead.
  • .getmaxsize() methods are deprecated; use .maxsize property instead.
  • TTLCache.getttl() method is deprecated; use .ttl property instead.

Fixed

  • make_typed_key function bug fixed.

Internal

  • Link-time optimization value changed.
  • codegen-units value changed.
  • strip value changed to reduce binary file size.
  • New dependency: typing_extensions