Tags: glenvan/ttl
Tags
Version 2.0.0 features and bugfixes - Make Context optional when creating a Map - Map.NewMap does not require a context parameter - Internally it uses context.Background - Map.NewMapContext does require a context parameter - A little easier on the user - Add per-key-value-pair TTL - Rename Map.NewMap and Map.NewMapContext's maxTTL parameter to defaultTTL - Now just the default - key/value pairs inserted with Map.Store will use this default - Add Map.StoreWithTTL - Adds a custom TTL to each mapItem - Fix bug in Store - If the item exists, the original value was not overwritten - Rename "refreshOnStore" variables and params to "refreshOnLoad" which is actually what's going on
Add Map.DeleteFunc - Add Map.DeleteFunc - Works like maps.DeleteFunc - Operates on the Value, not the *mapItem[V] - Add UTs to test deleting by key and deleting by value - Add godoc example - Modify the prune operation to use maps.DeleteFunc - Cleaner code - Ready for v0.2.0