- Add type parameters for the key and value type of a TimedMap and corresponding constructor functions.
- Remove the section system for better simplicity and usability.
- Remove deprecated
SetExpire
method. - Update documentation.
- Update minimum required Go version to v1.19.0.
- Multiple race conditions have been fixed (by @ShivamKumar2002 in #8)
- Add
FromMap
constructor which can be used to create aTimedMap
from an existing map with the given expiration values for each key-value pair.
-
Add
SetExpires
method to matchSection
interface and match naming scheme of the other expire-related endpoints.
→ Hence,SetExpire
is now deprecated and will be removed in the next version. Please useSetExpires
instead. -
Make use of
sync.Pool
to re-useelement
instances instead of creating new ones on each new element creation and passing them to the GC after deletion. -
Add
StartCleanerInternal
andStartCleanerExternal
endpoints to be able to re-start the internal cleanup loop with new specifications.
- Fix
concurrent map read and map write
panic when accessing the map concurrently while getting an existing key, which is expired at the time. [#4]