Beispiel #1
0
int borrarDir(const char *path) {
	int exit = 0;
	char key[255] = "LC";
	char* fatherPath = getFatherPath(path);
	strcat(key, fatherPath);
	memcached_st* memcached = connectionPool_extractAvaibleMemcached(pools);
	memcached_delete(memcached, (const char*) key, strlen(key), (time_t) 0);
	char mensajeCacheActualizarEntradaDir[255];
	sprintf(mensajeCacheActualizarEntradaDir,
			"Operacion: Actualizar Cache - path:%s", path);
	log_debug(teLogueo, mensajeCacheActualizarEntradaDir);
	char key2[255] = "AC";
	strcat(key2, path);
	memcached_delete(memcached, (const char*) key2, strlen(key2), (time_t) 0);
	char mensajeCacheActualizarAtributos[255];
	sprintf(mensajeCacheActualizarAtributos,
			"Operacion: Actualizar Cache - path:%s", path);
	log_debug(teLogueo, mensajeCacheActualizarAtributos);
	//memcached_finishHer(memcached, &servers);
	connectionPool_depositeAvaibleMemcached(pools, memcached);
	t_stream *stream = serializar_pedido_nombre(BORRAR_DIR, path);
	int descriptor = connectionPool_extractAvaibleSocket(pools);
	enviar_paquete(descriptor, stream->data, stream->length);
	char mensaje[255];
	sprintf(mensaje, "Operacion: Borrar Directorio - path:%s", path);
	log_debug(teLogueo, mensaje);
	char *mensaje_recibido = recibir_paquete(descriptor, 3);
	t_header *header = deserializadorHeader(mensaje_recibido);
	if (header->type == NO_EXISTE) {
		connectionPool_depositeAvaibleSocket(pools, descriptor);
		perror("No existe el directorio");
		return -ENOENT;
	}
	if (header->type == NAME_TOO_LONG) {
		connectionPool_depositeAvaibleSocket(pools, descriptor);
		perror("El nombre es demasiado largo");
		return -ENAMETOOLONG;
	}
	if (header->type == NO_ESTA_VACIO) {
		connectionPool_depositeAvaibleSocket(pools, descriptor);
		perror("El dir no esta vacio");
		return -ENOTEMPTY;
	}
	free(header);
	free(mensaje_recibido);
	free(stream);
	connectionPool_depositeAvaibleSocket(pools, descriptor);
	return exit;
}
Beispiel #2
0
/**
* @brief del_beansdb This function delete a key and its value in beansdb.
*
* @param memc The connection to beansdb.
* @param key The key.
*
* @return 1 for success and -1 for fail.
*/
int del_beansdb(memcached_st *memc, const char *key)
{
    int rst = -1;
    if(memc == NULL)
        return rst;

    memcached_return rc;

    rc = memcached_delete(memc, key, strlen(key), 0);

    if (rc == MEMCACHED_SUCCESS) 
    {
        LOG_PRINT(LOG_DEBUG, "Beansdb Key[%s] Delete Successfully.", key);
        rst = 1;
    }
    else
    {
        LOG_PRINT(LOG_DEBUG, "Beansdb Key[%s] Delete Failed!", key);
        const char *str_rc = memcached_strerror(memc, rc);
        LOG_PRINT(LOG_DEBUG, "Beansdb Result: %s", str_rc);
        rst = -1;
    }

    return rst;
}
Beispiel #3
0
bool FriendOfFriendMemcache::Erase(const char *key)
{
  bool result = true;

  pthread_mutex_lock(&this->memcache_lock_);

  if (this->handle_ == NULL) {
    MCE_FATAL("There isnot a connection!");
    result = false;
    goto _exit;
  }

  memcached_return_t ret;

  ret = memcached_delete(this->handle_, key, strlen(key), 0);
  if (ret == MEMCACHED_SUCCESS) {
    result = true;
    goto _exit;
  } else {
    if (ret != MEMCACHED_NOTFOUND) {
      MCE_FATAL("Unable to delete the key `" << key
          << "': " << memcached_strerror(this->handle_, ret));
    }
    result = false;
    goto _exit;
  }
_exit:
  pthread_mutex_unlock(&this->memcache_lock_);
  return result;
}
Beispiel #4
0
static test_return_t udp_delete_test(memcached_st *memc)
{
    unsigned int num_iters= 1025; //request id rolls over at 1024

    for (size_t x= 0; x < num_iters; x++)
    {
        memcached_return_t rc;
        const char *key= "foo";
        uint16_t *expected_ids=get_udp_request_ids(memc);
        unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));
        memcached_server_instance_st instance=
            memcached_server_instance_by_position(memc, server_key);
        size_t init_offset= instance->write_buffer_offset;

        rc= memcached_delete(memc, key, strlen(key), 0);
        test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);

        if (rc == MEMCACHED_SUCCESS || instance->write_buffer_offset < init_offset)
            increment_request_id(&expected_ids[server_key]);
        if (rc == MEMCACHED_SUCCESS)
        {
            test_true(instance->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH);
        }
        else
        {
            test_true(instance->write_buffer_offset != UDP_DATAGRAM_HEADER_LENGTH);
            test_true(instance->write_buffer_offset <= MAX_UDP_DATAGRAM_LENGTH);
        }
        test_true(post_udp_op_check(memc,expected_ids) == TEST_SUCCESS);
    }
    return TEST_SUCCESS;
}
Beispiel #5
0
 virtual void remove(const char *key, size_t key_size) {
     memcached_return_t _error = memcached_delete(&memcached, key, key_size, 0);
     if(_error != MEMCACHED_SUCCESS) {
         fprintf(stderr, "Error performing delete operation (%d)\n", _error);
         exit(-1);
     }
 }
int main(int argc, char* argv[])
{
	if(argc < 4) { usage(); }

	char* host = argv[1];

	unsigned short port = atoi(argv[2]);
	if(port == 0) { usage(); }

	uint32_t num = atoi(argv[3]);
	if(num == 0) { usage(); }

	memcached_st* mc = memcached_create(NULL);
	if(mc == NULL) { pexit("memcached_create"); }

	memcached_server_add(mc, host, port);

//	memcached_behavior_set(mc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);

	char kbuf[strlen(KEY_PREFIX) + 11];
	char vbuf[strlen(VAL_PREFIX) + 11];

while(1) {
	uint32_t i;
	for(i=0; i < num; ++i) {
		int klen = sprintf(kbuf, KEY_PREFIX "%d", i);
		int vlen = sprintf(vbuf, VAL_PREFIX "%d", i);
		printf("set '%s' = '%s'\n", kbuf, vbuf);
		memcached_set(mc, kbuf, klen, vbuf, vlen, 0, 0);
	}

	for(i=0; i < num; ++i) {
		int klen = sprintf(kbuf, KEY_PREFIX "%d", i);
		int vlen = sprintf(vbuf, VAL_PREFIX "%d", i);
		size_t vallen;
		uint32_t flags;
		memcached_return rc;
		char* val = memcached_get(mc, kbuf, klen, &vallen, &flags, &rc);
		if(!val) {
			fprintf(stderr, "** key '%s' not found **\n", kbuf);
		} else if(vallen != vlen || memcmp(val, vbuf, vlen) != 0) {
			fprintf(stderr, "** key '%s' not match ** '", kbuf);
			fwrite(val, vallen, 1, stderr);
			fprintf(stderr, "'\n");
		} else {
			printf("get '%s' = '", kbuf);
			fwrite(val, vallen, 1, stdout);
			printf("'\n");
		}
	}

	for(i=0; i < num; ++i) {
		int klen = sprintf(kbuf, KEY_PREFIX "%d", i);
		printf("delete '%s'\n", kbuf);
		memcached_delete(mc, kbuf, klen, 0);
	}
}

	return 0;
}
Beispiel #7
0
void BaseMemcachedStore::delete_without_tombstone(const std::string& fqkey,
                                                  const std::vector<memcached_st*>& replicas,
                                                  SAS::TrailId trail)
{
  if (trail != 0)
  {
    SAS::Event event(trail, SASEvent::MEMCACHED_DELETE, 0);
    event.add_var_param(fqkey);
    SAS::report_event(event);
  }

  const char* key_ptr = fqkey.data();
  const size_t key_len = fqkey.length();

  for (size_t ii = 0; ii < replicas.size(); ++ii)
  {
    TRC_DEBUG("Attempt delete to replica %d (connection %p)",
              ii,
              replicas[ii]);

    memcached_return_t rc = memcached_delete(replicas[ii],
                                             key_ptr,
                                             key_len,
                                             0);

    if (!memcached_success(rc))
    {
      log_delete_failure(fqkey, ii, replicas.size(), trail, 0);
    }
  }
}
Beispiel #8
0
/**
 * @brief del_cache This function delete a key and its value in memcached.
 *
 * @param thr_arg The arg of thread.
 * @param key The key.
 *
 * @return  1 for success and -1 for fail.
 */
int del_cache(thr_arg_t *thr_arg, const char *key)
{
    int rst = -1;
    if(settings.cache_on == false)
        return rst;
    if(thr_arg->cache_conn == NULL)
        return rst;

    memcached_st *memc = thr_arg->cache_conn;
    memcached_return rc;

    rc = memcached_delete(memc, key, strlen(key), 0);

    if (rc == MEMCACHED_SUCCESS) 
    {
        LOG_PRINT(LOG_DEBUG, "Cache Key[%s] Delete Successfully.", key);
        rst = 1;
    }
    else if(rc == MEMCACHED_CONNECTION_FAILURE)
    {
        LOG_PRINT(LOG_DEBUG, "Cache Conn Failed!");
        //retry_cache(thr_arg);
    }
    else
    {
        LOG_PRINT(LOG_DEBUG, "Cache Key[%s] Delete Failed!", key);
        const char *str_rc = memcached_strerror(memc, rc);
        LOG_PRINT(LOG_DEBUG, "Cache Result: %s", str_rc);
        rst = -1;
    }

    return rst;
}
int
sstack_memcache_remove(memcached_st *memc, const char *key, log_ctx_t *ctx)
{
	int rc = -1;

	// Parameter validation
	if (NULL == key || NULL == memc) {
		sfs_log(ctx, SFS_ERR, "%s: Invalid parameters specified \n",
						__FUNCTION__);

		return -1;
	}
	rc = memcached_delete(memc, key, strlen(key), 0);
	if (rc != MEMCACHED_SUCCESS) {
		sfs_log(ctx, SFS_ERR, "%s: memcached_delete for key %s failed with "
						"error %d \n", __FUNCTION__, key, rc);

		return -rc;
	} else {
		sfs_log(ctx, SFS_INFO, "%s: Key %s deleted from memcached db \n",
						__FUNCTION__, key);

		return 0;
	}
}
void eliminarValor(char operacion, const char *path) {

	if (cache != 0) {
		extern pthread_mutex_t bloquearCache;

		char *key = malloc(sizeof(char) + strlen(path) + 1);
		extern memcached_st *memcached;
		size_t tamkey = 0;
		memcached_return resultado;

		key = armarKey(operacion, path);

		tamkey = strlen(key);
		pthread_mutex_lock(&bloquearCache);

		resultado = memcached_delete(memcached, key, tamkey, (time_t) 0);

		if (resultado == MEMCACHED_SUCCESS)
			printf("Se elimino %s en la Memcached\n", key);
		else
			printf("Error al eliminar %s en la Memcached\n", key);

		free(key);
		pthread_mutex_unlock(&bloquearCache);
	}
}
static void php_memc_sess_unlock(memcached_st *memc)
{
	if (MEMC_G(sess_locked)) {
		memcached_delete(memc, MEMC_G(sess_lock_key), MEMC_G(sess_lock_key_len), 0);
		MEMC_G(sess_locked) = 0;
		efree(MEMC_G(sess_lock_key));
		MEMC_G(sess_lock_key_len) = 0;
	}
}
Beispiel #12
0
void MemcachedSessionManager::delete_session(Session &session)
{
    memcached_return rc;
    std::string const &sessionid = session.sessionid();
    rc = memcached_delete(memcached_conn, sessionid.data(),
            sessionid.length(), 0);
    if (rc != MEMCACHED_SUCCESS)
        throw MemcacheError(memcached_conn, rc);
}
 /**
  * Delete an object from the server specified by the key given.
  *
  * @param[in] key key of object to delete
  * @return true on success; false otherwise
  */
 bool remove(const std::string &key)
 {
   if (key.empty())
   {
     return false;
   }
   memcached_return rc= memcached_delete(&memc, key.c_str(), key.length(), 0);
   return (rc == MEMCACHED_SUCCESS);
 }
Beispiel #14
0
int main(int argc, char *argv[])
{
  memcached_st *memc;
  memcached_return rc;
  memcached_server_st *servers;

  options_parse(argc, argv);

  if (!opt_servers)
  {
    char *temp;

    if ((temp= getenv("MEMCACHED_SERVERS")))
      opt_servers= strdup(temp);
    else
    {
      fprintf(stderr, "No Servers provided\n");
      exit(1);
    }
  }

  memc= memcached_create(NULL);
  process_hash_option(memc, opt_hash);

  servers= memcached_servers_parse(opt_servers);
  memcached_server_push(memc, servers);
  memcached_server_list_free(servers);
  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, opt_binary);
  
  while (optind < argc) 
  {
    if (opt_verbose) 
      printf("key: %s\nexpires: %llu\n", argv[optind], (unsigned long long)opt_expire);
    rc = memcached_delete(memc, argv[optind], strlen(argv[optind]), opt_expire);

    if (rc != MEMCACHED_SUCCESS) 
    {
      fprintf(stderr, "memrm: %s: memcache error %s", 
	      argv[optind], memcached_strerror(memc, rc));
      if (memc->cached_errno)
	fprintf(stderr, " system error %s", strerror(memc->cached_errno));
      fprintf(stderr, "\n");
    }

    optind++;
  }

  memcached_free(memc);

  if (opt_servers)
    free(opt_servers);
  if (opt_hash)
    free(opt_hash);

  return 0;
}
void Cache::remove( const MC2String& key ) {
   SysUtility::IgnorePipe ignorePipe;

   memcached_return rc = memcached_delete( m_pimpl->memc.get(),
                                           key.c_str(),
                                           strlen( key.c_str() ),
                                           0 );
   
   throwOnFail( rc, m_pimpl->memc.get(), "Couldn't delete a value" );
}
/**
 * @function memcached.remove
 * 
 * ### Synopsis
 * 
 * var rc = memcached.remove(handle, key);
 * 
 * Remove an item from memcached by key.
 * 
 * @param {object} handle - handle to memcached connection.
 * @param {string} key - key of data to set in memcached.
 * @return {int} rc - result code; 0 if no error, otherwise the error code.
 */
JSVAL _memcached_remove (JSARGS args) {
    HandleScope scope;
    M *handle = HANDLE(args[0]);
    String::Utf8Value key(args[1]);
    time_t expiration = 0;
    if (args.Length() > 2) {
        expiration = args[2]->IntegerValue();
    }
    return scope.Close(Integer::New(memcached_delete(handle, *key, strlen(*key), expiration)));
}
Beispiel #17
0
void ESPMemCached::remove(const char* groupID, const char* cacheID)
{
    memcached_return_t rc;
    size_t groupIDLength = strlen(groupID);
    if (groupIDLength)
        rc = memcached_delete_by_key(connection, groupID, groupIDLength, cacheID, strlen(cacheID), (time_t)0);
    else
        rc = memcached_delete(connection, cacheID, strlen(cacheID), (time_t)0);
    assertOnError(rc, "'Delete' request failed - ");
}
Beispiel #18
0
bool c_Memcache::t_delete(CStrRef key, int expire /*= 0*/) {
  if (key.empty()) {
    raise_warning("Key cannot be empty");
    return false;
  }

  memcached_return_t ret = memcached_delete(&m_memcache,
                                            key.c_str(), key.length(),
                                            expire);
  return (ret == MEMCACHED_SUCCESS);
}
void wrap_memcached_remove(str* attr,void * memc)
{
	memcached_return  rc;

	rc = memcached_delete((memcached_st*)memc,attr->s,attr->len,0);

	if( rc != MEMCACHED_SUCCESS && rc != MEMCACHED_NOTFOUND)
	{
		LM_ERR("Failed to remove: %s\n",memcached_strerror(memc,rc));
	}
}
static
void s_unlock_session(memcached_st *memc)
{
	php_memcached_user_data *user_data = memcached_get_user_data(memc);

	if (user_data->is_locked) {
		memcached_delete(memc, user_data->lock_key->val, user_data->lock_key->len, 0);
		user_data->is_locked = 0;
		zend_string_release (user_data->lock_key);
	}
}
Beispiel #21
0
static int
exec_delete(memcached_st *mcd, const char *key, time_t expire)
{
	memcached_return_t	error =  memcached_delete(mcd, key, strlen(key),
												  expire);
	if (error == MEMCACHED_SUCCESS)
		printf("delete: key=%s expire=%lu\n", key, expire);
	else
		printf("delete: key=%s expire=%lu error=%s\n",
			   key, expire, memcached_strerror(mcd, error));
	return 0;
}
void delete_memcached(memcached_st *cache, const char* path, enum tipo_nipc nipc_type) {

	char *key = key_for_memcached(path, nipc_type);
	memcached_return_t memcached_response = memcached_delete(cache, key,
			strlen(key), (time_t) 0);
	if (memcached_response == MEMCACHED_SUCCESS) {
		log_info(memcached_logger, "Se borro la clave %s", key);
	} else {
		log_error(memcached_logger, "Error borrando la clave %s: %s", key,
				memcached_strerror(cache, memcached_response));
	}

}
/**
  * Data uma resposta, verifica se ela é válida para a requisição corrente.
  */
ngx_int_t verifica_captcha(ngx_http_request_t *r, ngx_str_t *resposta) {
    
    char captcha_key_buf[100];
    ngx_str_t captcha_key = ngx_string(captcha_key_buf);
    ngx_str_t cookie_name = ngx_string("CAPTCHA");
    
    if (resposta == NULL || resposta->len == 0) {
        return 0;
    }
    
    if (!le_cookie(r, &cookie_name, &captcha_key)) {
        return 0;
    }
    
    ngx_log_debug1( NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "request captcha key cookie is %s", captcha_key.data);
    
    
    
    // char * memcached_get(memcached_st *ptr, const char *key, size_t key_length, size_t *value_length, uint32_t *flags, memcached_return_t *error);
    // memcached_return_t mc_rc = memcached_set(memc, (char*) ngx_chave.data, ngx_chave.len, (char*)resposta, strlen((char*)resposta), (time_t) 10000, (uint32_t)0);
    // if (mc_rc != MEMCACHED_SUCCESS) {
    //     ngx_log_error(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
    //                    "Problemas ao escrever no memcached");
    //     return NGX_HTTP_INTERNAL_SERVER_ERROR;
    // }
    memcached_return_t mc_error;
    ngx_str_t resposta_correta;
    size_t tam = 0;
    uint32_t flags;
    resposta_correta.data = (u_char*) memcached_get(memc, (char*) captcha_key.data, captcha_key.len, &tam, &flags, &mc_error);
    if (mc_error != MEMCACHED_SUCCESS) {
        // FIXME diferenciar chave inexistente de conexao inexistente
        return 0;
    }
    resposta_correta.len = tam;
    
    if (resposta_correta.len != resposta->len) {
        ngx_log_debug2( NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "diferença no tamanho dos captchas: enviado->'%d' == '%d'<-correto", resposta->len, resposta_correta.len);
        return 0;
    }
    ngx_log_debug2( NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "comparando captcha: enviado->'%s' == '%s'<-correto", resposta->data, resposta_correta.data);

    int cmp = ngx_strncmp(resposta->data, resposta_correta.data, resposta_correta.len);
    if (cmp ==0) {
        // resposta correta
        time_t t = 0;
        memcached_delete(memc, (char*) captcha_key.data, captcha_key.len, t);
        return 1;
    }
    return 0;
}
Beispiel #24
0
Memcache_Res CMemcache:: Memcac_Delete(string strKey)
{
	Memcache_Res mRes 	= MEMCACHED_SUCCESS;

	if(strKey.empty())
		return static_cast<Memcache_Res>(MEMCACHED_INVALID_ARGUMENTS);

	// lock and delete
	pthread_mutex_lock(&m_hmc_mutex);
	mRes = memcached_delete(m_hMc, strKey.c_str(), strKey.length(), 0);
	pthread_mutex_unlock(&m_hmc_mutex);

	return mRes;
}
Beispiel #25
0
static int memcached_metatile_delete(struct storage_backend * store, const char *xmlconfig, int x, int y, int z) {
    char meta_path[PATH_MAX];
    memcached_return_t rc;

    memcached_xyz_to_storagekey(xmlconfig, x, y, z, meta_path);

    rc = memcached_delete(store->storage_ctx, meta_path, strlen(meta_path), 0);

    if (rc != MEMCACHED_SUCCESS) {
        return -1;
    }

    return 0;
}
Beispiel #26
0
/// Delete the data for the specified namespace and key.  Writes the data
/// unconditionally, so CAS is not needed.
Store::Status MemcachedStore::delete_data(const std::string& table,
                                          const std::string& key,
                                          SAS::TrailId trail)
{
  Store::Status status = Store::Status::OK;

  LOG_DEBUG("Deleting key %s from table %s", key.c_str(), table.c_str());

  // Construct the fully qualified key.
  std::string fqkey = table + "\\\\" + key;
  const char* key_ptr = fqkey.data();
  const size_t key_len = fqkey.length();

  // Delete from the read replicas - read replicas are a superset of the write replicas
  const std::vector<memcached_st*>& replicas = get_replicas(fqkey, Op::READ);

  if (trail != 0)
  {
    SAS::Event start(trail, SASEvent::MEMCACHED_DELETE, 0);
    start.add_var_param(fqkey);
    SAS::report_event(start);
  }

  LOG_DEBUG("Deleting from the %d read replicas for key %s", replicas.size(), fqkey.c_str());

  // First try to write the primary data record to the first responding
  // server.
  memcached_return_t rc = MEMCACHED_ERROR;
  size_t ii;
  for (ii = 0; ii < replicas.size(); ++ii)
  {
    LOG_DEBUG("Attempt delete to replica %d (connection %p)",
              ii,
              replicas[ii]);

    rc = memcached_delete(replicas[ii],
                          key_ptr,
                          key_len,
                          0);

    if (!memcached_success(rc))
    {
      // Deletes are unconditional so this should never happen
      LOG_ERROR("Delete failed to replica %d", ii);
    }
  }

  return status;
}
Beispiel #27
0
	void MemcachedCache::remove(const QString& key)
	{
		QWriteLocker lock(&m_lock);
		const QByteArray rawKey(fullKey(key));
		const memcached_return rt = memcached_delete(
			m_memcached,
			rawKey.constData(),
			rawKey.length(),
			0
		);
		if(rt != MEMCACHED_SUCCESS)
		{
			qFatal("Memcached error: %s", memcached_strerror(m_memcached, rt));
		}
	}
Beispiel #28
0
static void rush_delete(int nr, char *buf, char seed, uint32_t key_len, memcached_st *memc)
{
	int i;
	memcached_return_t rc;
	char *key, *value;

	for(i=0; i<nr; i++) {
		generate_key_value(i,buf,seed,&key,key_len,NULL,0);

		rc=memcached_delete(memc,key,key_len,(time_t)0);
		if(memcached_failed(rc)) {
			printf("memcached_delete() failed: %s\n",memcached_strerror(memc,rc));
		}
		PRINTF("i=%d, key_len=%ld\n",i,key_len);
	}
}
Beispiel #29
0
static int cdb_remove(knot_db_t *db, knot_db_val_t *key, int maxcount)
{
	if (!db || !key) {
		return kr_error(EINVAL);
	}

	struct memcached_cli *cli = db;
	memcached_return_t ret = 0;
	for (int i = 0; i < maxcount; ++i) {
		memcached_return_t ret = memcached_delete(cli->handle, key[i].data, key[i].len, 0);
		if (ret != 0) {
			break;
		}
	}
	return ret;
}
bool Memcached::Delete(const std::string& sKey, time_t tOverTime)
{
	if (m_pMemc == NULL)
	{
		return false;
	}

	m_rc = memcached_delete(m_pMemc, sKey.c_str(), sKey.length(), tOverTime);
	if (MEMCACHED_SUCCESS != m_rc)
	{
		m_sErrMsg = "memcached_delete failed.";
		return false;
	}

	return true;
}