Resolution: Won't Do
Affects Version/s: EJBCA 184.108.40.206
Fix Version/s: None
Component/s: PKI core
Issue discovered during:Ad Hoc
When org.cesecore.keys.token.CryptoTokenSessionBean.getCryptoToken(int) discovers that the cache data is stale it currently creates a new instance of the CryptoToken before checking if the object has changed in the database compared to the one in the cache.
This leads to spammed log and (low but) unnecessary use of resources. E.g.
INFO [org.cesecore.keys.token.SoftCryptoToken] (EJB default - 1) Activated Crypto Token with id -338601433.
int CommonCache<T>.getCurrentDigest(int id)
method would allow the
to compare digests right after reading the database object and refrain from trying to update the cache (and instantiate a new CryptoToken that is never used).