Method: Conflow::Redis::Identifier::ClassMethods#counter_key

Defined in:
lib/conflow/redis/identifier.rb

#counter_keyString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Redis key holding counter with IDs of model.

Examples:

default key

class My::Super::Class < Conflow::Redis::Field
  include Conflow::Redis::Identifier
end

My::Super::Class.counter_key #=> "my:super:class:idcnt"

Returns:

  • Redis key

API:

  • private



37
38
39
# File 'lib/conflow/redis/identifier.rb', line 37

def counter_key
  @counter_key ||= [*name.downcase.split("::"), :idcnt].join(":")
end