Skip to content

Tags: glenvan/ttl

Tags

v2.0.1

Toggle v2.0.1's commit message
Revise README.md ahead of v2.0.1 and publishing first v2 release

v2.0.0

Toggle v2.0.0's commit message
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

v1.0.0

Toggle v1.0.0's commit message
Add Context to ttl.NewMap

- Add a context to ttl.NewMap
  - Automatically closes the Map if the context is cancelled
  - Safe to call in conjunction with Map.Close
  - Add UTs and update example code and docs

v0.2.0

Toggle v0.2.0's commit message
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

v0.1.2

Toggle v0.1.2's commit message
Add go module publishing tasks to Taskfile and update version

- Ready to tag v0.1.2

v0.1.1

Toggle v0.1.1's commit message
Add tidy task

v0.1.0

Toggle v0.1.0's commit message
Add tidy task