Package org.jitsi.dnssec.validator
Class KeyCache
java.lang.Object
org.jitsi.dnssec.validator.KeyCache
Cache for DNSKEY RRsets or corresponding null/bad key entries with a limited
size and respect for TTL values.
- Author:
- davidb, Ingo Bauersachs
-
Field Details
-
MAX_TTL_CONFIG
Name of the property that configures the maximum cache TTL.- See Also:
-
MAX_CACHE_SIZE_CONFIG
Name of the property that configures the maximum cache size.- See Also:
-
-
Constructor Details
-
KeyCache
public KeyCache()Creates a new instance of this class.
-
-
Method Details
-
init
Initialize the cache. This implementation recognizes the following configuration parameters:- org.jitsi.dnssec.keycache.max_ttl
- The maximum TTL to apply to any cache entry.
- org.jitsi.dnssec.keycache.max_size
- The maximum number of entries that the cache will hold.
- Parameters:
config
- The configuration information.
-
find
Find the 'closest' trusted DNSKEY rrset to the given name.- Parameters:
n
- The name to start the search.dclass
- The class this DNSKEY rrset should be in.- Returns:
- The 'closest' entry to 'n' in the same class as 'dclass'.
-
store
Store aKeyEntry
in the cache. The entry will be ignored if it's rrset isn't a DNSKEY rrset or if it doesn't have the SECURE security status.- Parameters:
ke
- The key entry to cache.- Returns:
- The passed
KeyEntry
to allow method chaining.
-