anchor.diff:  == Introduction
   
   As conveyed in the <<caching-concepts.adoc#data-freshness-and-expiration,_Data Freshness and Expiration_>> documentation, this is one of the key aspects of caching.
  -In Ehcache 3 this is addressed with the `Expiry` interface and its use in controlling the age of cache mappings.
  +In Ehcache 3 this is addressed with the `ExpiryPolicy` interface and its use in controlling the age of cache mappings.
   
   == Configuration
   
  
positive.code: include::{sourcedir35}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=expiry]
  ----
  
  <1> Expiry is configured at the cache level, so start by defining a cache configuration,
  <2> then add to it an `Expiry`, here using the predefined _time-to-live_ one, configured with the required `Duration`.
  
  [source,xml,indent=0]
  ----
  
negative.code: 
  Also when used from XML, Ehcache expects your expiry implementation to have a _no-arg_ constructor.
  
  Once you have implemented your own expiry policy, simply configure it.
  
  In Java:
  
  