SYNOPSIS |
#include <dkim.h>
DKIM_STAT dkim_getcachestats(
DKIM_LIB *lib,
u_int *queries,
u_int *hits,
u_int *expired,
u_int *keys,
_Bool reset
);
Retrieve libopendkim caching statistics.
|
DESCRIPTION |
Called When |
dkim_getcachestats() can be called at any time. |
|
---|
ARGUMENTS |
Argument | Description |
lib |
A DKIM library handle as previously returned by a call to
dkim_init().
|
queries |
Pointer to an unsigned integer which will receive the number
of queries libopendkim has processed. This can be NULL if that
datum is not of interest to the caller.
|
hits |
Pointer to an unsigned integer which will receive the number
of queries which were found in the cache being maintained
by the library. This can be NULL if that datum is not of
interest to the caller.
|
expired |
Pointer to an unsigned integer which will receive the number
of queries which were found in the cache but whose time-to-live
value had expired and thus a re-query was required. This can
be NULL if that datum is not of interest to the caller.
|
keys |
Pointer to an unsigned integer which will receive the number
of records present in the cache. Note that this includes
records that have passed their time-to-live limits but have not
yet been purged. This can be NULL if that datum is not of interest
to the caller.
|
reset |
If TRUE, the queries, hits and expired
counters will be reset to 0. No change is made to cached data.
|
|
RETURN VALUES |
- DKIM_STAT_OK -- requested values returned
- DKIM_STAT_INVALID -- the cache has not yet been initialized
- DKIM_STAT_NOTIMPLEMENT -- library was not compiled with caching enabled
|
NOTES |
- Caching is enabled via the setting of the DKIM_LIBFLAGS_CACHE
library option using the
dkim_options() function.
- Caching must be enabled in the library at compile time since it
establishes an extra library dependency.
|