Platforms to show: All Mac Windows Linux Cross-Platform
NSCachedURLResponseMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Networking | MBS MacBase Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A NSCachedURLResponseMBS object provides the server’s response metadata in the form of a NSURLResponseMBS object, along with an NSData object containing the actual cached content data. Its storage policy determines whether the response should be cached on disk, in memory, or not at all.
Cached responses also contain a user info dictionary where you can store app-specific information about the cached item.
The NSURLCacheMBS class stores and retrieves instances of NSCachedURLResponseMBS.
- 5 properties
- property Data as MemoryBlock
- property Handle as Integer
- property Response as NSURLResponseMBS
- property StoragePolicy as Integer
- property UserInfo as Dictionary
- 2 methods
- method Constructor(response as NSURLResponseMBS, data as MemoryBlock, userInfo as Dictionary = nil, storagePolicy as Integer = 0)
- method copy as NSCachedURLResponseMBS
- 3 constants
Storage Policies
Constant | Value | Description |
---|---|---|
kCacheStorageAllowed | 0 |
Allow caching. |
kCacheStorageAllowedInMemoryOnly | 1 |
Allow caching only in memory. |
kCacheStorageNotAllowed | 1 |
Caching is not allowed. |
This class has no sub classes.
Some methods using this class:
- NSURLCacheMBS.cachedResponseForRequest(request as NSURLRequestMBS) as NSCachedURLResponseMBS
- NSURLCacheMBS.storeCachedResponse(cachedResponse as NSCachedURLResponseMBS, request as NSURLRequestMBS)
Some events using this class:
- NSURLConnectionMBS.willCacheResponse(cachedResponse as NSCachedURLResponseMBS) as NSCachedURLResponseMBS
- NSURLSessionMBS.dataTaskWillCacheResponse(dataTask as NSURLSessionDataTaskMBS, proposedResponse as NSCachedURLResponseMBS) as NSCachedURLResponseMBS
Some examples using this class:
Blog Entries
Xojo Developer Magazine
Release notes
- Version 19.0
- Added NSCachedURLResponseMBS class.
The items on this page are in the following plugins: MBS MacBase Plugin.