init method

Future<void> init()

Initializes the cache storage system.

This method must be called before using any read/write operations. It sets up the underlying storage system and prepares it for use.

Returns

A Future&lt;void&gt; that completes when initialization is finished.

Throws

Example

try {
  await CacheStorageHandler.instance.init();
  print('Cache storage ready');
} catch (e) {
  print('Failed to initialize cache: $e');
}

Implementation

Future<void> init() async {
  await GetStorage.init();
}