go-cache, v1.4
Posted on

The library that implements an in-memory cache with garbage collection in two modes: total (based on a full scan) and partial (based on expiration in Redis).
Support options for the implementation of an in-memory cache and for implementations of garbage collection.
Change Log
- implementation of an in-memory cache:
- options (optional):
- implementation of a key-value storage;
- callback for timing;
- options (optional):
- implementation of garbage collection:
- implementation of total garbage collection (based on a full scan):
- options (optional):
- callback for timing;
- options (optional):
- implementation of partial garbage collection (based on expiration in Redis):
- options (optional):
- callback for timing;
- maximum iteration count;
- minimum percent of expired values;
- options (optional):
- implementation of total garbage collection (based on a full scan):
- refactoring:
- update the
github.com/thewizardplusplus/go-hashmappackage; - use the
hashmap.Storageinterface;
- update the
- misc.:
- improve the Travis CI configuration.
Features
- implementation of an in-memory cache:
- operations:
- getting a value by a key:
- signaling a reason for the absence of a key - missed or expired;
- getting a value by a key with deletion of expired values:
- signaling a reason for the absence of a key - missed or expired;
- setting a key-value pair with a specified time to live:
- support of key-value pairs without a set time to live (persistent);
- deletion;
- getting a value by a key:
- options (optional):
- implementation of a key-value storage;
- callback for timing;
- operations:
- implementation of garbage collection:
- independent implementation of garbage collection running:
- support interruption via a context;
- support specification of a running period;
- implementation of total garbage collection (based on a full scan):
- options (optional):
- callback for timing;
- options (optional):
- implementation of partial garbage collection (based on expiration in Redis):
- options (optional):
- callback for timing;
- maximum iteration count;
- minimum percent of expired values.
- options (optional):
- independent implementation of garbage collection running:
Repository
Link: https://github.com/thewizardplusplus/go-cache/tree/v1.4.
Content: code.
License: MIT.