Considers cache dirty if cache duration changes

If current cache_duration is shorter than initial cache_duration (when cache was written), considers the cache dirty and throw a CacheExpiredException.

Certainly more useful in development mode where cache duration can depend on cookies or devices than in production mode.