From 07518763034af020bdb29b38fd4274c9234bb5bc Mon Sep 17 00:00:00 2001 From: Cyril Soler Date: Mon, 16 Nov 2015 14:06:45 -0500 Subject: [PATCH] changed MAX_CACHE_SIZE to not use the default (fixes previous commit that was wrong) --- libretroshare/src/services/p3idservice.cc | 6 ++++-- libretroshare/src/services/p3idservice.h | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/services/p3idservice.cc b/libretroshare/src/services/p3idservice.cc index f8683729b..64a02fa1b 100644 --- a/libretroshare/src/services/p3idservice.cc +++ b/libretroshare/src/services/p3idservice.cc @@ -56,6 +56,8 @@ #define ID_REQUEST_REPUTATION 0x0003 #define ID_REQUEST_OPINION 0x0004 +#define GXSID_MAX_CACHE_SIZE 5000 + static const uint32_t MAX_KEEP_UNUSED_KEYS = 30*86400 ; // remove unused keys after 30 days static const uint32_t MAX_DELAY_BEFORE_CLEANING = 601 ; // clean old keys every 10 mins @@ -144,8 +146,8 @@ RsIdentity *rsIdentity = NULL; p3IdService::p3IdService(RsGeneralDataService *gds, RsNetworkExchangeService *nes, PgpAuxUtils *pgpUtils) : RsGxsIdExchange(gds, nes, new RsGxsIdSerialiser(), RS_SERVICE_GXS_TYPE_GXSID, idAuthenPolicy()), RsIdentity(this), GxsTokenQueue(this), RsTickEvent(), - mPublicKeyCache(DEFAULT_MEM_CACHE_SIZE, "GxsIdPublicKeyCache"), - mPrivateKeyCache(DEFAULT_MEM_CACHE_SIZE, "GxsIdPrivateKeyCache"), + mPublicKeyCache(GXSID_MAX_CACHE_SIZE, "GxsIdPublicKeyCache"), + mPrivateKeyCache(GXSID_MAX_CACHE_SIZE, "GxsIdPrivateKeyCache"), mIdMtx("p3IdService"), mNes(nes), mPgpUtils(pgpUtils) { diff --git a/libretroshare/src/services/p3idservice.h b/libretroshare/src/services/p3idservice.h index 00a7d144f..d38a9117e 100644 --- a/libretroshare/src/services/p3idservice.h +++ b/libretroshare/src/services/p3idservice.h @@ -187,10 +187,6 @@ virtual std::string save() const; #define ID_LOCAL_STATUS_FULL_CALC_FLAG 0x00010000 #define ID_LOCAL_STATUS_INC_CALC_FLAG 0x00020000 - -//#define MAX_CACHE_SIZE 100 // Small for testing.. -#define MAX_CACHE_SIZE 5000 // More useful size - class RsGxsIdGroupItem; class RsGxsIdCache