defaultFetchTtl top-level constant

Duration const defaultFetchTtl

Global default TTL for cached data.

Used by fetchWithTtl when no explicit TTL is provided. Repositories can override this for entity-specific TTL requirements.

Making this configurable: To connect this to user preferences later:

  1. Create a provider that reads from SharedPreferences/secure storage
  2. Pass the value through repository constructors or as a parameter
  3. Example: fetchWithTtl(cached: data, ttl: ref.watch(userTtlPrefProvider))

Implementation

const Duration defaultFetchTtl = Duration(days: 3);