#include <cat/cat.h>
#include <cat/catutil.h>
int cat_newmemdb(int nbuckets, int ttl, cat_memdb **db);
The ttl value specifies the time-to-live, in seconds, for entries in the database. Entries older than this will be purged from the database. A ttl of zero disables expiration of entries, while a negative one causes a built-in default value to be used.
If the function is successful, the db value will point to the initialized database.
The database should be freed by the caller with a call to cat_freememdb.
This function is not thread-safe. The sequence of database accesses must be handled by the caller.
cat_freememdb, cat_memdbfunc, cat_memdbforeach, cat_memdbflags, catssl_setdb, catdasp_setdb, catcert_setdb