vendor/bundle/ruby/1.8/gems/Ruby-MemCache-0.0.1/lib/memcache.rb
### Mark all entries on all servers as expired.
Mark all entries on all servers as expired.
Mark all entries on all servers as expired .
def flush_all
		raise MemCacheError, "no active servers" unless self.active?
		raise MemCacheError, "readonly cache" if self.readonly?
		res = @mutex.synchronize( Sync::EX ) {
			servers = @servers.select {|svr| svr.alive? }
			cmds = self.make_command_map( "flush_all", servers )
			self.add_stat( :flush_all ) {
				self.send( cmds )
			}
		}
		!res.find {|svr,st| st.rstrip != 'OK'}
	end
def flush_all raise MemCacheError , "no active servers" unless self . active? raise MemCacheError , "readonly cache" if self . readonly? res = @mutex . synchronize ( Sync :: EX ) { servers = @servers . select { | svr | svr . alive? } cmds = self . make_command_map ( "flush_all" , servers ) self . add_stat ( :flush_all ) { self . send ( cmds ) } } ! res . find { | svr , st | st . rstrip != 'OK' } end
Mark all entries on all servers as expired.
Mark all entries on all servers as expired .
# Build commandset for servers that are alive # Send them in parallel