Skip to content

Releases: thewizardplusplus/go-cache

v1.5.2

28 Jul 00:03

Choose a tag to compare

Pass a context to the cache.NewCacheWithGC() method directly.

Change Log

  • pass a context to the cache.NewCacheWithGC() method directly.

Features

  • implementation of an in-memory cache:
    • operations:
      • running garbage collection at the same time as initializing a cache (optional);
      • 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;
      • iteration over values and their keys:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • iteration over values and their keys with deletion of expired values:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • setting a key-value pair with a specified time to live:
        • support of key-value pairs without a set time to live (persistent);
      • deletion;
    • options (optional):
      • without running garbage collection:
        • implementation of a key-value storage;
        • callback for timing;
      • with running garbage collection:
        • context for stopping of iteration;
        • implementation of a key-value storage;
        • callback for timing;
        • callback that produces an instance of an implementation of garbage collection;
        • period of running of garbage collection;
  • 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;
    • implementation of partial garbage collection (based on expiration in Redis):
      • options (optional):
        • callback for timing;
        • maximum iteration count;
        • minimum percent of expired values.

v1.5.1

05 Dec 18:35

Choose a tag to compare

Add explanatory comments for the implementation of an in-memory cache and describe releases of the library.

Change Log

  • improve benchmarks:
    • remove data races from additional concurrent loading;
  • implementation of an in-memory cache:
    • add explanatory comments;
  • describe for releases:
    • features;
    • change log.

Features

  • implementation of an in-memory cache:
    • operations:
      • running garbage collection at the same time as initializing a cache (optional);
      • 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;
      • iteration over values and their keys:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • iteration over values and their keys with deletion of expired values:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • setting a key-value pair with a specified time to live:
        • support of key-value pairs without a set time to live (persistent);
      • deletion;
    • options (optional):
      • without running garbage collection:
        • implementation of a key-value storage;
        • callback for timing;
      • with running garbage collection:
        • context for stopping of iteration;
        • implementation of a key-value storage;
        • callback for timing;
        • callback that produces an instance of an implementation of garbage collection;
        • period of running of garbage collection;
  • 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;
    • implementation of partial garbage collection (based on expiration in Redis):
      • options (optional):
        • callback for timing;
        • maximum iteration count;
        • minimum percent of expired values.

v1.5

08 Nov 00:28

Choose a tag to compare

Support running garbage collection at the same time as initializing a cache and support iteration over values and their keys in a cache.

Change Log

  • implementation of an in-memory cache:
    • operations:
      • running garbage collection at the same time as initializing a cache (optional);
      • iteration over values and their keys:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • iteration over values and their keys with deletion of expired values:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
    • options (with running garbage collection; optional):
      • context for stopping of iteration;
      • implementation of a key-value storage;
      • callback for timing;
      • callback that produces an instance of an implementation of garbage collection;
      • period of running of garbage collection;
  • refactoring:
    • use the hashmap.WithInterruption() function;
    • extract the models package:
      • move the cache.Clock type into it;
      • move the cache.Value structure into it;
  • add the example with running garbage collection at the same time as initializing a cache.

Features

  • implementation of an in-memory cache:
    • operations:
      • running garbage collection at the same time as initializing a cache (optional);
      • 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;
      • iteration over values and their keys:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • iteration over values and their keys with deletion of expired values:
        • support stopping of iteration:
          • via a handling result;
          • via a context;
      • setting a key-value pair with a specified time to live:
        • support of key-value pairs without a set time to live (persistent);
      • deletion;
    • options (optional):
      • without running garbage collection:
        • implementation of a key-value storage;
        • callback for timing;
      • with running garbage collection:
        • context for stopping of iteration;
        • implementation of a key-value storage;
        • callback for timing;
        • callback that produces an instance of an implementation of garbage collection;
        • period of running of garbage collection;
  • 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;
    • implementation of partial garbage collection (based on expiration in Redis):
      • options (optional):
        • callback for timing;
        • maximum iteration count;
        • minimum percent of expired values.

v1.4

04 Nov 21:53

Choose a tag to compare

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;
  • implementation of garbage collection:
    • implementation of total garbage collection (based on a full scan):
      • options (optional):
        • callback for timing;
    • implementation of partial garbage collection (based on expiration in Redis):
      • options (optional):
        • callback for timing;
        • maximum iteration count;
        • minimum percent of expired values;
  • refactoring:
    • update the github.com/thewizardplusplus/go-hashmap package;
    • use the hashmap.Storage interface;
  • 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;
    • options (optional):
      • implementation of a key-value storage;
      • callback for timing;
  • 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;
    • implementation of partial garbage collection (based on expiration in Redis):
      • options (optional):
        • callback for timing;
        • maximum iteration count;
        • minimum percent of expired values.

v1.3

17 Sep 20:05

Choose a tag to compare

Improve support of interruption of garbage collection via a context, improve benchmarks, and perform refactoring.

Change Log

  • implementation of garbage collection:
    • improve support of interruption via a context:
      • pass a context to the gc.GC.Clean() method;
      • additional interruption via a context:
        • in the gc.TotalGC.Clean() method;
        • in the gc.PartialGC.Clean() method;
  • improve benchmarks:
    • add to benchmarks:
      • different storage sizes;
      • different expired percents;
    • stop at the end of each benchmark:
      • garbage collecting;
      • additional concurrent loading;
    • slow down additional concurrent loading;
  • refactoring:
    • extract from the gc.TotalGC.Clean() method:
      • the gc.TotalGC.handleIteration() method;
    • extract from the gc.PartialGC.Clean() method:
      • the gc.counter structure;
      • the gc.iterator structure.

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;
  • 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);
    • implementation of partial garbage collection (based on expiration in Redis).

v1.2

16 Jul 23:18

Choose a tag to compare

Implementation of partial garbage collection (based on expiration in Redis) and of independent running of garbage collection.

Change Log

  • implementation of garbage collection:
    • independent implementation of garbage collection running;
    • implementation of partial garbage collection (based on expiration in Redis).

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;
  • 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);
    • implementation of partial garbage collection (based on expiration in Redis).

v1.1

10 Jul 23:05

Choose a tag to compare

Implementation of total garbage collection (based on a full scan).

Change Log

  • implementation of an in-memory cache:
    • make public the expired value model;
  • implementation of garbage collection:
    • implementation of total garbage collection (based on a full scan):
      • support interruption via a context;
      • support specification of a running period.

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;
  • implementation of garbage collection:
    • implementation of total garbage collection (based on a full scan):
      • support interruption via a context;
      • support specification of a running period.

v1.0

08 Jul 23:38

Choose a tag to compare

Major version.

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.