method

read_counter

rails latest stable - Class: ActiveSupport::Cache::Store

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

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.