setCacheConfig static method
Set cache related configuration.
Supported version: 1.1.0 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 NameZEGO.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.
-
configCustom cache configuration
Implementation
static void setCacheConfig(ZIMCacheConfig config) {
ZIMManager.setCacheConfig(config);
}