enableAutoRemoveCache abstract method

Future<void> enableAutoRemoveCache(
  1. bool enable
)

Enables or disables the automatic cache file removal feature.

When automatic cache file removal is enabled, if the number or total size of cached media files in the player exceeds the set limit, the SDK automatically removes the least recently used cache file.

  • enable Whether to enable automatic cache file removal: true : Enables automatic cache file removal. false : (Default) Disables automatic cache file removal.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions. < 0: Failure. See MediaPlayerReason.

Implementation

Future<void> enableAutoRemoveCache(bool enable);