diff options
author | se <se@FreeBSD.org> | 2012-07-04 09:02:12 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 2012-07-04 09:02:12 +0000 |
commit | 8b8c2303a1367a15ab7a322db29473fd4b7f5e89 (patch) | |
tree | 1159be7852686e97260b128780be12bec0efb726 /usr.sbin/nscd/config.h | |
parent | e5f970ed4ae0b5e770b2a67c389d8eb77ec82993 (diff) | |
download | FreeBSD-src-8b8c2303a1367a15ab7a322db29473fd4b7f5e89.zip FreeBSD-src-8b8c2303a1367a15ab7a322db29473fd4b7f5e89.tar.gz |
Add the possibility to specify a threshold for the number of negative cache
results required to have the cache return lookup failure.
A new configuration parameter is introduced, which must be set to a value
greater than 1 to activate this feature. The default behavior is unchanged.
The purpose of this change is to allow probes for the existence of an entry
(which are expected to fail), before that entry is added to one of the
queried databases, without the cache returning the stale information from
the probe query until that cache entry expires. If, for example, a new user
account is created after checking that the new account name is available,
the negative cache entry would prevent immediate access to the account.
For that example, the new configuration option
negative-confidence-threshold passwd 2
will require a second negative query result to consider the negative cache
entry for a passwd entry valid, but if the user account has been created
between the queries, then the positive query result from the second query
will be cached and returned.
Diffstat (limited to 'usr.sbin/nscd/config.h')
-rw-r--r-- | usr.sbin/nscd/config.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/nscd/config.h b/usr.sbin/nscd/config.h index 6c42932..29770e6 100644 --- a/usr.sbin/nscd/config.h +++ b/usr.sbin/nscd/config.h @@ -44,9 +44,11 @@ #define DEFAULT_POSITIVE_ELEMENTS_SIZE (2048) #define DEFAULT_POSITIVE_LIFETIME (3600) +#define DEFAULT_POSITIVE_CONF_THRESH (1) #define DEFAULT_NEGATIVE_ELEMENTS_SIZE (2048) #define DEFAULT_NEGATIVE_LIFETIME (60) +#define DEFAULT_NEGATIVE_CONF_THRESH (1) /* (2) ??? */ #define DEFAULT_MULTIPART_ELEMENTS_SIZE (1024 * 8) #define DEFAULT_MULITPART_SESSIONS_SIZE (1024) |