Big Update v2.0.0
In this release, I rewritten all implemetations, documentation, and stub-file.
Added
- New
.drain(n)method: According to cache algorithm, deletes and returnsnitems from cache. - New
.shrink_to_fit()method: Shrinks the capacity of the cache as much as possible.
Removed
- The
MRUCacheremoved.
Changed
__new__methods changed; Now you can insert items to caches when creating those.TTLCacheNoDefaultname changed toVTTLCache.__iter__,keys,valuesanditemsmethods now are iterable.LFUCachesorting algorithm changed to improve speed.__eq__and__ne__methods changed.cacheddecorator parameterclear_reusedefault value fromTruechanged toFalse.
Deprecated
.delete()methods are deprecated; usedel cache[key]instead..getmaxsize()methods are deprecated; use.maxsizeproperty instead.TTLCache.getttl()method is deprecated; use.ttlproperty instead.
Fixed
make_typed_keyfunction bug fixed.
Internal
- Link-time optimization value changed.
codegen-unitsvalue changed.stripvalue changed to reduce binary file size.- New dependency:
typing_extensions