loadPolicies method
Load policy limits (from cache first, then remote).
Implementation
Future<void> loadPolicies() async {
// Try cache first
final cached = await _loadFromCache();
if (cached != null) {
_policies = cached;
}
// Fetch from remote (non-blocking)
try {
final remote = await _fetchRemote();
if (remote != null) {
_policies = remote;
_lastFetch = DateTime.now();
await _saveToCache(remote);
}
} catch (_) {
// Fail-open: use cached or allow all
}
}