added spiderdb disk cache

This commit is contained in:
Matt 2015-09-11 12:52:31 -06:00
parent d0055cda6b
commit fcca380cbb
3 changed files with 24 additions and 1 deletions

1
Conf.h

@ -574,6 +574,7 @@ class Conf {
int64_t m_tagdbFileCacheSize;
int64_t m_clusterdbFileCacheSize;
int64_t m_titledbFileCacheSize;
int64_t m_spiderdbFileCacheSize;
//bool m_quickpollCoreOnError;
bool m_useShotgun;

@ -49,7 +49,7 @@ key192_t makeCacheKey ( int64_t vfd ,
return k;
}
RdbCache g_rdbCaches[4];
RdbCache g_rdbCaches[5];
class RdbCache *getDiskPageCache ( char rdbId ) {
@ -86,6 +86,13 @@ class RdbCache *getDiskPageCache ( char rdbId ) {
maxRecs = maxMem / 3000;
dbname = "titdbcache";
}
if ( rdbId == RDB_SPIDERDB ) {
rpc = &g_rdbCaches[4];
maxSizePtr = &g_conf.m_spiderdbFileCacheSize;
maxMem = *maxSizePtr;
maxRecs = maxMem / 3000;
dbname = "spdbcache";
}
if ( ! rpc )
return NULL;

@ -11515,6 +11515,21 @@ void Parms::init ( ) {
m->m_group = 0;
m++;
m->m_title = "spiderdb disk cache size";
m->m_desc = "How much file cache size to use in bytes? Titledb "
"holds the cached web pages, compressed. Gigablast consults "
"it to generate a summary for a search result, or to see if "
"a url Gigablast is spidering is already in the index.";
m->m_cgi = "dpcsx";
m->m_off = (char *)&g_conf.m_spiderdbFileCacheSize - g;
m->m_type = TYPE_LONG_LONG;
m->m_def = "30000000";
m->m_flags = 0;//PF_HIDDEN | PF_NOSAVE;
m->m_page = PAGE_MASTER;
m->m_obj = OBJ_CONF;
m->m_group = 0;
m++;
/*