+class Purge
+{
+public:
+ Purge(memcached_st* arg) :
+ _memc(arg)
+ {
+ memcached_set_purging(_memc, true);
+ }
+
+ ~Purge()
+ {
+ memcached_set_purging(_memc, false);
+ }
+
+private:
+ memcached_st* _memc;
+};
+
+class PollTimeout
+{
+public:
+ PollTimeout(memcached_st* arg) :
+ _timeout(arg->poll_timeout),
+ _origin(arg->poll_timeout)
+ {
+ _origin = 2000;
+ }
+
+ ~PollTimeout()
+ {
+ _origin= _timeout;
+ }
+
+private:
+ int32_t _timeout;
+ int32_t& _origin;
+};
+
+bool memcached_purge(memcached_server_write_instance_st ptr)