Versioned Content Service
Component Detail
Service Layer
low complexity
Shared Component
mobile
1
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Fetches versioned static content (accessibility statement, privacy policy) from a backend endpoint and caches it in Drift for offline availability. Handles cache invalidation when the backend returns a new content version. Shared across all static informational screens that serve regulatory or legal content.
versioned-content-service
Responsibilities
- Fetch content from versioned backend endpoint (e.g. /api/v1/static-content/:slug)
- Store fetched content and its version hash in the local Drift database
- Return cached content when offline, refreshing when connectivity is restored
- Expose version metadata so the UI can display a last-updated indicator
Interfaces
fetchContent(slug: String) → Future<StaticContentResult>
getCachedContent(slug: String) → StaticContentResult?
clearCache(slug: String) → Future<void>