forked from jftuga/TtlMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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
- Loading branch information
Showing
7 changed files
with
278 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.