Platforms to show: All Mac Windows Linux Cross-Platform
NSURLCacheMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Networking | MBS MacBase Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSURLCache implements the caching of responses to URL load requests by mapping NSURLRequest objects to NSCachedURLResponse objects. It is a composite of an in-memory and an on-disk cache.
Methods are provided to manipulate the sizes of each of these caches as well as to control the path on disk to use for persistent storage of cache data.
- 5 properties
- property currentDiskUsage as UInt64
- property currentMemoryUsage as UInt64
- property diskCapacity as UInt64
- property Handle as Integer
- property memoryCapacity as UInt64
- 7 methods
- method cachedResponseForRequest(request as NSURLRequestMBS) as NSCachedURLResponseMBS
- method Constructor(memoryCapacity as UInt64, diskCapacity as UInt64, diskPath as folderitem)
- method removeAllCachedResponses
- method removeCachedResponseForRequest(request as NSURLRequestMBS)
- method removeCachedResponsesSinceDate(d as date)
- method removeCachedResponsesSinceDate(d as dateTime)
- method storeCachedResponse(cachedResponse as NSCachedURLResponseMBS, request as NSURLRequestMBS)
- 2 shared methods
- shared method setSharedURLCache(cache as NSURLCacheMBS)
- shared method sharedURLCache as NSURLCacheMBS
- 3 constants
Constants
Constant | Value | Description |
---|---|---|
NSURLCacheStorageAllowed | 0 |
One of the constants for the cache strategy.
Specifies that storage in an NSURLCache is allowed without restriction. |
NSURLCacheStorageAllowedInMemoryOnly | 1 |
One of the constants for the cache strategy.
Specifies that storage in an NSURLCache is allowed; however storage should be done in memory only, no disk storage should be done. |
NSURLCacheStorageNotAllowed | 2 |
One of the constants for the cache strategy.
Specifies that storage in an NSURLCache is not allowed in any fashion, either in memory or on disk. |
This class has no sub classes.
Some properties using for this class:
- NSURLSessionConfigurationMBS.URLCache as NSURLCacheMBS
Blog Entries
Xojo Developer Magazine
- 17.5, page 41: What's New in the MBS Plugins, With the Plugins growing every year, here are new capabilities you may have missed by Stefanie Juchmes
- 17.2, page 10: News
Videos
Release notes
- Version 19.0
- Added more methods to NSURLCacheMBS class.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSURLAuthenticationChallengeMBS - NSURLConnectionFilterMBS