Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSURLCacheMBS class.

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
Returns the cached URL response in the cache for the specified URL request.

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)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes an NSURLCache object with the specified values.

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 9.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Clears the receiver's cache, removing all stored cached URL responses.

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
Removes the cached URL response for a specified URL request.

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)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 19.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Clears the given cache of any cached responses since the provided date.

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)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 20.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Clears the given cache of any cached responses since the provided date.

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)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacBase Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Stores a cached URL response for a specified request.

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.


The biggest plugin in space...