ENGINEERING NOTE 20 / 50 · SMS
Cache SMS status without showing stale completion
Cache duration should follow lifecycle sensitivity. A catalogue can tolerate more staleness than a cancellation or refund result.
Published by OPEN RAMBO. The engineering patterns and pseudocode illustrate designs, not a documented product API. Numerical examples are illustrative.
Separate catalogue and order cache
Do not reuse a general product-cache policy for active order status. Scope order cache keys by authorized user and order. Ensure shared intermediaries cannot cache authenticated receipt responses for another customer.
Invalidate on transitions
A successful cancellation request does not necessarily mean terminal cancellation. Invalidate stale views when an authoritative event arrives, then re-read the current version. Include a version or updated timestamp so clients can discard older responses that arrive late.
Avoid optimistic financial labels
The UI may optimistically disable a button, but should not announce refund completion until the ledger confirms it. Show last-updated time when offline. A cached successful receipt can be displayed only to the same authorized owner with appropriate data handling.
Illustrative implementation
if response.version < rendered.version:
discard(response)
else:
render(response.state, response.updated_at)Acceptance check
Delay an old waiting response until after a received response. The screen must not move backward to waiting.