Policy Content Service
Component Detail
Service Layer
low complexity
mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Fetches the privacy policy document from a versioned backend endpoint and caches it in the local Drift database with a configurable TTL for offline access. Performs version fingerprint comparison to detect policy updates and triggers the review prompt at next login when a new version is available.
policy-content-service
Responsibilities
- Fetch versioned policy content from backend REST endpoint
- Cache fetched content in Drift local database with TTL expiry
- Compare stored version fingerprint against backend version on app launch
- Expose update flag consumed by the Privacy Policy Screen to show review prompt
Interfaces
fetchPolicy(): Future<PolicyDocument>
getCachedPolicy(): PolicyDocument?
checkForUpdate(): Future<bool>
markPolicyReviewed(String version): Future<void>