class TTLCacheEntryValidity
        implements ICacheEntryValidity {
    
    private final long cacheTTLMs;
    private final long creationTimeInMillis;

    
    /**
     * <p>
     *   Creates a new instance of this validity implementation. 
     * </p>
     * 
     * @param cacheTTLMs the TTL to be applied to the template resolution.
     */
    public TTLCacheEntryValidity(final long cacheTTLMs) {
        super();
        this.cacheTTLMs = cacheTTLMs;
        this.creationTimeInMillis = System.currentTimeMillis();
    }
    
    
    /**
     * <p>
     *   Returns the TTL in milliseconds to be applied to template
     *   validity.
     * </p>
     * 
     * @return the TTL in milliseconds
     */
    public long getCacheTTLMs() {
        return this.cacheTTLMs;
    }
    

    /**
     * <p>
     *   Returns true. Templates are always considered cacheable using this
     *   validity implementation.
     * </p>
     * 
     * @return true
     */
    public boolean isCacheable() {
        return true;
    }
    

    /**
     * <p>
     *   Returns whether the template resolution can still be considered valid. This
     *   is done by computing the difference in milliseconds between the moment when
     *   this object was created and the moment this method is called, and checking
     *   it is less than the established TTL (time-to-live).
     * </p>
     * 
     * @return whether the (cached) template resolution can still be considered valid.  
     */
    public boolean isCacheStillValid() {<FILL_FUNCTION_BODY>}
    
}

        final long currentTimeInMillis = System.currentTimeMillis();
        return (currentTimeInMillis < this.creationTimeInMillis + this.cacheTTLMs);
    
<no_super_class>