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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.