changed MAX_CACHE_SIZE to not use the default (fixes previous commit that was wrong)

This commit is contained in:
Cyril Soler 2015-11-16 14:06:45 -05:00
parent b44d08ac4c
commit 0751876303
2 changed files with 4 additions and 6 deletions

View File

@ -56,6 +56,8 @@
#define ID_REQUEST_REPUTATION 0x0003 #define ID_REQUEST_REPUTATION 0x0003
#define ID_REQUEST_OPINION 0x0004 #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_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 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) p3IdService::p3IdService(RsGeneralDataService *gds, RsNetworkExchangeService *nes, PgpAuxUtils *pgpUtils)
: RsGxsIdExchange(gds, nes, new RsGxsIdSerialiser(), RS_SERVICE_GXS_TYPE_GXSID, idAuthenPolicy()), : RsGxsIdExchange(gds, nes, new RsGxsIdSerialiser(), RS_SERVICE_GXS_TYPE_GXSID, idAuthenPolicy()),
RsIdentity(this), GxsTokenQueue(this), RsTickEvent(), RsIdentity(this), GxsTokenQueue(this), RsTickEvent(),
mPublicKeyCache(DEFAULT_MEM_CACHE_SIZE, "GxsIdPublicKeyCache"), mPublicKeyCache(GXSID_MAX_CACHE_SIZE, "GxsIdPublicKeyCache"),
mPrivateKeyCache(DEFAULT_MEM_CACHE_SIZE, "GxsIdPrivateKeyCache"), mPrivateKeyCache(GXSID_MAX_CACHE_SIZE, "GxsIdPrivateKeyCache"),
mIdMtx("p3IdService"), mNes(nes), mIdMtx("p3IdService"), mNes(nes),
mPgpUtils(pgpUtils) mPgpUtils(pgpUtils)
{ {

View File

@ -187,10 +187,6 @@ virtual std::string save() const;
#define ID_LOCAL_STATUS_FULL_CALC_FLAG 0x00010000 #define ID_LOCAL_STATUS_FULL_CALC_FLAG 0x00010000
#define ID_LOCAL_STATUS_INC_CALC_FLAG 0x00020000 #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 RsGxsIdGroupItem;
class RsGxsIdCache class RsGxsIdCache