class RemoteLock::Adapters::Memcached

Public Instance Methods

delete(key) click to toggle source
# File lib/remote_lock/adapters/memcached.rb, line 11
def delete(key)
  @connection.delete(key)
end
has_key?(key) click to toggle source
# File lib/remote_lock/adapters/memcached.rb, line 15
def has_key?(key)
  @connection.get(key) == uid
end
store(key, expires_in_seconds) click to toggle source
# File lib/remote_lock/adapters/memcached.rb, line 6
def store(key, expires_in_seconds)
  status = @connection.add(key, uid, expires_in_seconds)
  status =~ /^STORED/
end