method
write_counter
v8.1.1 -
Show latest stable
- Class:
ActiveSupport::Cache::Store
write_counter(name, value, **options)public
Writes a counter that can then be modified 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.