HTTPClient cacheEnabled Cache-Control enforcement iOS vs Android
0 reputation · 25 Mar 2020, 19:57 UTC
Titanium SDK HTTPClient exposes cacheEnabled to store responses in a local file cache keyed by URL and request headers. Documentation states that Cache-Control directives such as max-age, no-cache and must-revalidate should dictate cache usage, but the enforcement logic is not specified.
The client also accepts a cachePolicy parameter whose interaction with standard Cache-Control parsing is undocumented. The cache is shared across all HTTPClient instances within a process, raising questions about isolation and eviction. SDK 7.x and 8.x notes mention stale cache fixes on iOS and reported regressions on Android 12, with no official test suite validating HTTP spec compliance.
The unresolved design decision is whether Cache-Control headers should be treated as absolute, platform-agnostic directives or allow platform-specific overrides for performance.
Does cacheEnabled honor Cache-Control max-age, no-cache and must-revalidate identically on iOS and Android in SDK 7.x and 8.x? How does cachePolicy interact with Cache-Control parsing when both are set? What isolation and eviction guarantees exist for the shared process cache?