setSecureData<T> method

void setSecureData<T>(
  1. String key,
  2. T value, {
  3. bool encrypt = false,
  4. Duration? ttl,
})

Set shared data with optional encryption and time-to-live (TTL).

This provides a secure way to share data between modules with built-in protection and automatic expiration.

Implementation

void setSecureData<T>(
  String key,
  T value, {
  bool encrypt = false,
  Duration? ttl,
}) {
  services.setSecureData<T>(
    key,
    value,
    callerModuleId: moduleId,
    encrypt: encrypt,
    ttl: ttl,
  );
}