Platforms to show: All Mac Windows Linux Cross-Platform

NSURLCacheMBS.cachedResponseForRequest(request as NSURLRequestMBS) as NSCachedURLResponseMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 19.0 Yes No No Yes All
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 iOS Targets
method Cocoa Networking MBS MacBase Plugin 9.7 Yes No No Yes All
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 iOS Targets
method Cocoa Networking MBS MacBase Plugin 9.7 Yes No No Yes All
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 iOS Targets
method Cocoa Networking MBS MacBase Plugin 9.7 Yes No No Yes All
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 iOS Targets
method Cocoa Networking MBS MacBase Plugin 19.0 Yes No No No Desktop, Console & Web
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.

See also:

Feedback, Comments & Corrections

NSURLCacheMBS.removeCachedResponsesSinceDate(d as dateTime)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 20.5 Yes No No Yes All
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.

See also:

Feedback, Comments & Corrections

NSURLCacheMBS.storeCachedResponse(cachedResponse as NSCachedURLResponseMBS, request as NSURLRequestMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 19.0 Yes No No Yes All
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 tutorial videos

Start Chat