cachePodPlaces static method

Future<void> cachePodPlaces(
  1. String content
)

Cache Pod places JSON content to SharedPreferences.

content should be the raw JSON string from the Pod.

Implementation

static Future<void> cachePodPlaces(String content) async {
  try {
    final prefs = await SharedPreferences.getInstance();
    await prefs.setString(_podPlacesCacheKey, content);
    await prefs.setInt(
      _podPlacesCacheTimestampKey,
      DateTime.now().millisecondsSinceEpoch,
    );
  } catch (_) {
    // Silently fail - caching is best-effort.
  }
}