#define KEY_MAX 256
#define STR_MAX 256
+#define GDBM_CACHE_SIZE 10 /* GDBM default == 100 */
+
enum tag_type {
TAG_TYPE_PLATFORM,
TAG_TYPE_CUSTOM,
datum d_data;
int ret;
char *tag_s;
+ int cache_size = GDBM_CACHE_SIZE;
if (!key || !type || !value)
return SYSTEM_INFO_ERROR_INVALID_PARAMETER;
return SYSTEM_INFO_ERROR_IO_ERROR;
}
+ ret = gdbm_setopt(db, GDBM_CACHESIZE, &cache_size, sizeof(cache_size));
+ if (ret < 0)
+ _E("Failed to set cache size to (%d) (ret:%d)", cache_size, gdbm_errno);
+
if (strstr(key, KEY_PREFIX) == key)
snprintf(key_internal, sizeof(key_internal),
"%s:%s:%s", key, type, tag_s);
datum d_data;
int ret, i;
char *tag_s;
+ int cache_size = GDBM_CACHE_SIZE;
if (!key || !type)
return SYSTEM_INFO_ERROR_INVALID_PARAMETER;
return SYSTEM_INFO_ERROR_IO_ERROR;
}
+ ret = gdbm_setopt(db, GDBM_CACHESIZE, &cache_size, sizeof(cache_size));
+ if (ret < 0)
+ _E("Failed to set cache size to (%d) (ret:%d)", cache_size, gdbm_errno);
+
for (i = 0 ; i < ARRAY_SIZE(info_type); i++) {
if (strstr(key, KEY_PREFIX) == key)
snprintf(key_internal, sizeof(key_internal),