Method: Memcache::NativeServer#flush_all

Defined in:
ext/native_server.c

#flush_all(*args) ⇒ Object



532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'ext/native_server.c', line 532

VALUE mc_flush_all(int argc, VALUE *argv, VALUE self) {
  memcached_st *mc;
  VALUE delay;
  static memcached_return_t result;

  Data_Get_Struct(self, memcached_st, mc);
  rb_scan_args(argc, argv, "01", &delay);

  result = memcached_flush(mc, RTEST(delay) ? NUM2UINT(delay) : 0);

  if (result == MEMCACHED_SUCCESS) {
    return Qnil;
  } else {
    return throw_error(&result);
  }
}