cacheDurationFilter

Mapping of the data duration in cache to the corresponding request URL filter.

When an HTTP response is cacheable, if the request URL contains the String, then the entry will be stored in cache for a Duration of time.

For example:

  • cacheDurationFilter = mapOf("/tile/basic" to 120.seconds)

  • Request: https://api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf

  • Response: CacheControl = "maxAge=60"

  • In this case, Response data will be stored in cache for 120 seconds instead of 60.