SDDiskCache

@interface SDDiskCache : NSObject <SDDiskCache>

The built-in disk cache.

  • Cache Config object - storing all kind of settings.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) SDImageCacheConfig *config;

    Swift

    var config: SDImageCacheConfig { get }
  • Unavailable

    Declaration

    Objective-C

    - (nonnull instancetype)init NS_UNAVAILABLE;
  • Move the cache directory from old location to new location, the old location will be removed after finish. If the old location does not exist, does nothing. If the new location does not exist, only do a movement of directory. If the new location does exist, will move and merge the files from old location. If the new location does exist, but is not a directory, will remove it and do a movement of directory.

    Declaration

    Objective-C

    - (void)moveCacheDirectoryFromPath:(nonnull NSString *)srcPath
                                toPath:(nonnull NSString *)dstPath;

    Swift

    func moveDirectory(fromPath srcPath: String, toPath dstPath: String)

    Parameters

    srcPath

    old location of cache directory

    dstPath

    new location of cache directory