Class OCSPRespondersCache
java.lang.Object
eu.emi.security.authn.x509.helpers.ocsp.OCSPCacheBase
eu.emi.security.authn.x509.helpers.ocsp.OCSPRespondersCache
OCSP failing responses cache: in memory with disk persistence. Only IOExceptions are cached.
- Author:
- K. Benedyczak
-
Field Summary
Fields inherited from class eu.emi.security.authn.x509.helpers.ocsp.OCSPCacheBase
ASCII, diskPath, maxTtl, prefix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCache
(String key, IOException error) void
checkCachedError
(String responderKey) Checks if there is a cached and not outdated cache entry for a given responder key.void
createResponderKey
(X509Certificate issuerCert) Methods inherited from class eu.emi.security.authn.x509.helpers.ocsp.OCSPCacheBase
encodeDigest
-
Constructor Details
-
OCSPRespondersCache
- Parameters:
maxTtl
- maximum time after each cached response expires. Negative for no cache at all, 0 for no limit (i.e. caching time will be only controlled by the OCSP response validity period). In ms.diskPath
- if not null, cached responses will be stored on disk.prefix
- used if disk cache is enabled, as a common prefix for all files created in the cache directory.
-
-
Method Details
-
checkCachedError
Checks if there is a cached and not outdated cache entry for a given responder key. If this is the case a cached exception is thrown.- Parameters:
responderKey
- responder key- Throws:
IOException
- IO exception
-
addToCache
- Throws:
IOException
-
clearMemoryCache
public void clearMemoryCache() -
createResponderKey
-