Platforms to show: All Mac Windows Linux Cross-Platform
NSURLCacheMBS.cachedResponseForRequest(request as NSURLRequestMBS) as NSCachedURLResponseMBS
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 19.0 | Yes | No | No | Yes | All |
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.
NSURLCacheMBS.Constructor(memoryCapacity as UInt64, diskCapacity as UInt64, diskPath as folderitem)
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 9.7 | Yes | No | No | Yes | All |
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.
NSURLCacheMBS.removeAllCachedResponses
Function:
Clears the receiver's cache, removing all stored cached URL responses.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 9.7 | Yes | No | No | Yes | All |
NSURLCacheMBS.removeCachedResponseForRequest(request as NSURLRequestMBS)
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 9.7 | Yes | No | No | Yes | All |
Notes: request: The URL request whose cached URL response should be removed. If there is no corresponding cached URL response, no action is taken.
NSURLCacheMBS.removeCachedResponsesSinceDate(d as date)
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 19.0 | Yes | No | No | No | Desktop, Console & Web |
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:
NSURLCacheMBS.removeCachedResponsesSinceDate(d as dateTime)
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 20.5 | Yes | No | No | Yes | All |
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:
NSURLCacheMBS.storeCachedResponse(cachedResponse as NSCachedURLResponseMBS, request as NSURLRequestMBS)
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Networking | MBS MacBase Plugin | 19.0 | Yes | No | No | Yes | All |
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.
The items on this page are in the following plugins: MBS MacBase Plugin.

Links
MBS Xojo tutorial videos