NSURLCache category with additional features. More...
#import <BlackBerryDynamics/GD/GDNET.h>
This class is a category of the native NSURLCache
class that adds the functions documented below to the interface. The additional functions can be used when the BlackBerry Dynamics proxy infrastructure is in use in the URL Loading System, see GDURLLoadingSystem, or in the URL session system, see NSURLSession Support.
This class provides additional features to the default cache.
This documentation includes only additional operations that are not part of the default NSURLCache
interface.
Note that the additional features cannot be used when the BlackBerry Dynamics proxy infrastructure isn't in use, even if temporarily. If the functions are called in this state, they have no effect.
Instance Methods | |
(void) | - setMaxCacheFileAge: |
Set the default maximum age of cached files. More... | |
(void) | - setMaxCacheFileSize: |
Set the maximum permitted size of a cached file. More... | |
(NSUInteger) | - maxCacheFileSize |
Get the maximum permitted size of a cached file. More... | |
- (void) setMaxCacheFileAge: | (NSTimeInterval) | age |
Call this function to set a default maximum age for cached files. The default maximum age will be used where it is less than the maximum age specified in the server cache directive, if any.
The default maximum only applies when the BlackBerry Dynamics proxy infrastructure is in use as described in the description, above.
age | NSTimeInterval representing the maximum age in seconds. |
- (void) setMaxCacheFileSize: | (NSUInteger) | fileSize |
Call this function to set the maximum permitted size of a cached file. If not set, a default maximum of 1 megabyte will be used. If set to 0, cache will be disabled. If size of file is greater than 5% of cache capacity, the file will not be cached.
This function sets the limit for a single file, not for the size of the whole cache. The capacity of the cache as a whole can be set using the native NSURLCache
programming interfacer. See the NSURLCache Class Reference on the apple.com developer website for details.
The permitted maximum only applies when the BlackBerry Dynamics proxy infrastructure is in use as described in the description, above.
fileSize | NSUInteger representing the maximum file size in bytes. |
- (NSUInteger) maxCacheFileSize |
Call this function to get the maximum permitted size of a cached file.
This function returns the limit for a single file, not for the size of the whole cache. The native NSURLCache
API can be used to access information about the cache as a whole. See the NSURLCache Class Reference on the apple.com developer website for details.
The permitted maximum only applies when the BlackBerry Dynamics proxy infrastructure is in use as described in the description, above.
NSUInteger
representing the maximum file size in bytes.