anchor.diff:  include::{sourcetestdir}/eu/europa/esig/dss/cookbook/example/snippets/OCSPSourceSnippet.java[tags=demo]
   ----
   
  -We use these classes during the certificate validation process through "validationContext" object (based on ValidationContext class) which is a "cache" for one validation request that contains every object retrieved so far. This object in turn instantiates a "verifier" based on `RevocationDataLoadingStrategy` class whose role is to fetch revocation data by querying an OCSP or CRL source in the defined order and return the succeeded result.
  +We use these classes during the certificate validation process through `validationContext` object (based on `ValidationContext` class) which is a "cache" for a validation request that contains every object required for a complete validation process. This object in turn instantiates a "verifier" based on `RevocationDataLoadingStrategy` class whose role is to fetch revocation data by querying an OCSP or CRL source in the defined order and return the succeeded result (see <<RevocationLoadingStrategy>> for more details).
  +
   In general, we can distinguish three main sources:
   
   * Offline sources (`OfflineRevocationSource`);
   * Online sources (`OnlineRevocationSource`);
  -* Sources with the cache mechanism;
  -* List of sources (`ListRevocationSource`) with a collection of several sources.
  +* Sources with the cache mechanism.
   
  +As well as a list of sources (`ListRevocationSource`) with a collection of several sources.
   
   === Caching
   
  -The above-mentioned class allows caching of CRL and OCSP responses to a user-chosen source. By default DSS provides a JDBC based implementation for this class, but other implementations also can be created. The class contains a complete set of functions to save revocation data to a database, extract, update and remove it. +
  -Furthermore, the `RepositoryRevocationSource` allows the implementer to define a backup revocation source, for the case if the database does not contain the certificate's revocation data yet. +
  +The above-mentioned class allows caching of CRL and OCSP responses to a user-chosen source. By default, DSS provides a JDBC based implementation for this class, but other implementations also can be created. The class contains a complete set of functions to save revocation data to a database, extract, update and remove it. +
  +Furthermore, the `RepositoryRevocationSource` allows the implementer to define a backup revocation source, for the case if the database does not contain the certificate's revocation data yet.
   
   List of cached Revocation sources implemented in DSS:
   
  
positive.code: [[RetrievingRevocationData]]
  == Retrieving revocation data in DSS
  
  A CRL is a time-stamped list identifying revoked certificates. It is signed by a Certificate Authority (CA) and made freely available in a public repository. Each revoked certificate is identified in a CRL by its certificate serial number.
  
  The Online Certificate Status Protocol (OCSP) is an Internet protocol used for obtaining the revocation status of a unique X.509 digital certificate.
  
  For every certificate, the validity has to be checked via CRL or OCSP responses. The information may originate from different CRLSources or OCSPSources:
  For easing the usage of such sources, DSS implements a CRLSource and OCSPSource interfaces (which inherit from RevocationSource), which offer a generic, uniform way of accessing CRL and OCSP sources. Furthermore, a caching mechanism can be easily attached to those sources, optimizing the access time to revocation information by reducing network connections to online servers.
  
  The interface CRLSource defines the method which returns CRLToken for the given certificate/issuer certificate couple:
  
  [source,java,indent=0]
  .CRLSource usage
  
negative.code: ** `JdbcCacheCRLSource`
  ** `JdbcCacheOCSPSource`
  
  WARNING: A database table shall be initialized before you start working with the cached revocation repository.
  
  ==== CRL
  An example for JdbcCacheCRLSource :
  