preloadData method
- NSData data, {
- required NSURL forURL,
- NSDate? modificationDate,
- NSDate? expirationDate,
- NSString? eTag,
- required bool mustRevalidate,
Inserts 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 method is asynchronous; the data may not be immediately available for in-progress requests, though subsequent requests should have access to the cached data.
To find out when the resource is ready to retrieve from the cache, use the
MLNOfflineStorage/preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:completionHandler:
method.
@param data Response data to store for this resource. The data is expected to be uncompressed; internally, the cache will compress data as necessary. @param url The URL at which the data can normally be found. @param modified The date the resource was last modified. @param expires The date after which the resource is no longer valid. @param eTag An HTTP entity tag. @param mustRevalidate A Boolean value indicating whether the data is still usable past the expiration date.
Implementation
void preloadData(objc.NSData data, {required objc.NSURL forURL,objc.NSDate? modificationDate,objc.NSDate? expirationDate,objc.NSString? eTag,required bool mustRevalidate}) {
_objc_msgSend_1xt2lpz(this.ref.pointer, _sel_preloadData_forURL_modificationDate_expirationDate_eTag_mustRevalidate_, data.ref.pointer, forURL.ref.pointer, modificationDate?.ref.pointer ?? ffi.nullptr, expirationDate?.ref.pointer ?? ffi.nullptr, eTag?.ref.pointer ?? ffi.nullptr, mustRevalidate);
}