Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

NSURLCacheMBS.cachedResponseForRequest(request as NSURLRequestMBS) as NSCachedURLResponseMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 19.0 Yes No No Yes, macOS only No
Function: Returns the cached URL response in the cache for the specified URL request.
Notes:
request: The URL request whose cached response is desired.

Returns the cached URL response for request, or nil if no response has been cached.

Feedback, Comments & Corrections

NSURLCacheMBS.Constructor(memoryCapacity as UInt64, diskCapacity as UInt64, diskPath as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 9.7 Yes No No Yes, macOS only No
Function: Initializes an NSURLCache object with the specified values.
Notes:
memoryCapacity: The memory capacity of the cache, in bytes.
diskCapacity: The disk capacity of the cache, in bytes.
path: The location at which to store the on-disk cache.

The returned NSURLCache is backed by disk, so developers can be more liberal with space when choosing the capacity for this kind of cache. A disk cache measured in the tens of megabytes should be acceptable in most cases.

Feedback, Comments & Corrections

NSURLCacheMBS.removeAllCachedResponses
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 9.7 Yes No No Yes, macOS only No
Function: Clears the receiver's cache, removing all stored cached URL responses.

Feedback, Comments & Corrections

NSURLCacheMBS.removeCachedResponseForRequest(request as NSURLRequestMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 9.7 Yes No No Yes, macOS only No
Function: Removes the cached URL response for a specified URL request.
Notes: request: The URL request whose cached URL response should be removed. If there is no corresponding cached URL response, no action is taken.

Feedback, Comments & Corrections

NSURLCacheMBS.removeCachedResponsesSinceDate(d as date)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 19.0 Yes No No Yes, macOS only No
Function: Clears the given cache of any cached responses since the provided date.
Notes:
d: The earliest date of responses that should remain in the cache. Any responses with dates later than this parameter should be removed.

Available in macOS 10.10 or newer.

Feedback, Comments & Corrections

NSURLCacheMBS.storeCachedResponse(cachedResponse as NSCachedURLResponseMBS, request as NSURLRequestMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Networking MBS MacBase Plugin 19.0 Yes No No Yes, macOS only No
Function: Stores a cached URL response for a specified request.
Notes:
cachedResponse: The cached URL response to store.
request: The request for which the cached URL response is being stored.

If you override this method, you should also override storeCachedResponse.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacBase Plugin.

The biggest plugin in space...




Links
MBS Xojo Plugins