method

read_counter

read_counter(name, **options)
public

Reads a counter that was set by #increment / #decrement.

cache.write_counter("foo", 1)
cache.read_counter("foo") # => 1
cache.increment("foo")
cache.read_counter("foo") # => 2

Options are passed to the underlying cache implementation.