vendor/bundle/ruby/1.8/gems/Ruby-MemCache-0.0.1/lib/memcache.rb
def delete( key, time=nil )
		raise MemCacheError, "no active servers" unless self.active?
		raise MemCacheError, "readonly cache" if self.readonly?
		svr = nil

		res = @mutex.synchronize( Sync::EX ) {
			svr = self.get_server( key )
			cachekey = self.make_cache_key( key )

			self.add_stat( :delete ) do
				cmd = "delete %s%s" % [ cachekey, time ? " #{time.to_i}" : "" ]
				self.send( svr => cmd )
			end
		}

		res && res[svr].rstrip == "DELETED"
	end
### Delete the entry with the specified key, optionally at the specified
### +time+.
Delete the entry with the specified key, optionally at the specified
+time+.
Delete the entry with the specified key optionally at the specified + time + .
def delete( key, time=nil )
		raise MemCacheError, "no active servers" unless self.active?
		raise MemCacheError, "readonly cache" if self.readonly?
		svr = nil
		res = @mutex.synchronize( Sync::EX ) {
			svr = self.get_server( key )
			cachekey = self.make_cache_key( key )
			self.add_stat( :delete ) do
				cmd = "delete %s%s" % [ cachekey, time ? " #{time.to_i}" : "" ]
				self.send( svr => cmd )
			end
		}
		res && res[svr].rstrip == "DELETED"
	end
def delete ( key , time = nil ) raise MemCacheError , "no active servers" unless self . active? raise MemCacheError , "readonly cache" if self . readonly? svr = nil res = @mutex . synchronize ( Sync :: EX ) { svr = self . get_server ( key ) cachekey = self . make_cache_key ( key ) self . add_stat ( :delete ) do cmd = "delete %s%s" % [ cachekey , time ? " #{time.to_i}" : "" ] self . send ( svr => cmd ) end } res && res [ svr ] . rstrip == "DELETED" end
Delete the entry with the specified key, optionally at the specified
+time+.
Delete the entry with the specified key optionally at the specified + time + .
key
time