setCacheConfig static method

dynamic setCacheConfig(
  1. ZIMCacheConfig config
)

Set cache related configuration.

config Log configuration object. Supported version: 2.1.5 and above.

Detailed description: Example Set the SDK cache file path. Because the SDK has a default path, it is generally not recommended that you set your own path unless there is a strong need to do so.

Default value:Android:/storage/Android/data/packageName/files/ZIMCaches iOS:~/Library/Caches/ZIMCaches macOS:(sandbox)~/Library/Containers/Bundle ID/Data/Library/Caches/ZIMCaches / ~/Library/Caches/ZIMCaches Windows:C:\Users[Your UserName]\AppData[App Name]ZEGO.SDK\ZIMCaches

Call timing: It must be called before create.

Note: If the developer calls after create, the SDK saves the configuration until it takes effect the next time create is invoked.

Related callbacks: In addition to getting the login result in the callback parameter, the developer will also receive the onConnectionStateChanged callback during the login request and after the login is successful/failed to determine the current user's login status.

Life cycle: Set before calling create and takes effect when calling create. If the developer does not set the new logging configuration the next time create is created, the previous configuration will still take effect.

Platform difference: The default path varies with platforms. Please refer to the default value.

config Cache configuration object.

Implementation

/// Supported version: 2.1.5 and above.
///
/// Detailed description: Example Set the SDK cache file path. Because the SDK has a default path, it is generally not recommended that you set your own path unless there is a strong need to do so.
///
/// Default value:Android:/storage/Android/data/packageName/files/ZIMCaches
/// iOS:~/Library/Caches/ZIMCaches
/// macOS:(sandbox)~/Library/Containers/[Bundle ID]/Data/Library/Caches/ZIMCaches / ~/Library/Caches/ZIMCaches
/// Windows:C:\Users\[Your UserName]\AppData\[App Name]ZEGO.SDK\ZIMCaches
///
/// Call timing: It must be called before [create].
///
/// Note: If the developer calls after [create], the SDK saves the configuration until it takes effect the next time [create] is invoked.
///
/// Related callbacks: In addition to getting the login result in the callback parameter, the developer will also receive the [onConnectionStateChanged] callback during the login request and after the login is successful/failed to determine the current user's login status.
///
/// Life cycle: Set before calling [create] and takes effect when calling [create]. If the developer does not set the new logging configuration the next time [create] is created, the previous configuration will still take effect.
///
/// Platform difference: The default path varies with platforms. Please refer to the default value.
///
/// [config] Cache configuration object.
static setCacheConfig(ZIMCacheConfig config) {
  ZIMManager.setCacheConfig(config);
}