Class: Dalli::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/active_store/connection.rb

Instance Method Summary collapse

Instance Method Details

#validate_key(key) ⇒ Object

Monkey patch to avoid having a separate branch

Raises:

  • (ArgumentError)


16
17
18
19
# File 'lib/active_store/connection.rb', line 16

def validate_key (key)
  raise ArgumentError, "key cannot be blank" if key.nil? || key.strip.size == 0
  raise ArgumentError, "key too long #{key.inspect}" if key.length > 250
end