putResourceWithUrl

external fun putResourceWithUrl(url: String?, data: ByteArray?, modified: Long, expires: Long, etag: String?, mustRevalidate: Boolean)

Insert the provided resource into the ambient cache This method mimics the caching that would take place if the equivalent resource were requested in the process of map rendering. Use this method to pre-warm the cache with resources you know will be requested.

This call is asynchronous: the data may not be immediately available for in-progress requests, although subsequent requests should have access to the cached data.

Parameters

url

The URL of the resource to insert

data

Response data to store for this resource. Data is expected to be uncompressed; internally, the cache will compress data as necessary.

modified

Optional "modified" response header, in seconds since 1970, or 0 if not set

expires

Optional "expires" response header, in seconds since 1970, or 0 if not set

etag

Optional "entity tag" response header

mustRevalidate

Indicates whether response can be used after it's stale