Files
AnyPS5/docs/dev/debt/libSceHttpCache.md
T

2.9 KiB

libSceHttpCache technical debt

Unknown function info

Functional

  • libSceHttpCache - cached responses live in process memory, keyed by user, URL and User-Agent value, instead of the console's per-user files, so they are lost when the process exits; they survive Term. Request states, freshness, revalidation and header rules follow firmware 13.60, read from disassembly, not measured on a console. A public response stored while cache sharing is on, which the console files under the store shared by all users, throws through NotImplemented_nid_no_patch, as do a lookup and a ClearAll by another user while such an entry exists, since whether they reach the shared store was not read. The console's debug request header that adds cache state to responses is not reproduced. Header numbers the firmware's stoul or stol rejects, a null URL in Retrieve (the firmware dereferences it) and an empty header list to return throw.
  • libSceHttpCache - SetQuota, ClearAllUserTags and a non-null RegisterCacheInfoUrl throw through NotImplemented_nid_no_patch once their arguments pass; Clear, CreateRequestWithTag, RemoveTag, ClearCacheInfo, both WithMemoryPool forms, SystemInit, SystemClearAll and SystemShutdown throw outright, so no entry has a tag or a quota. Init ignores its pool size, so the pool allocation failure is not reproduced, and storing never fails, so the console's file errors are not reproduced.
  • libSceHttpCache - the freshness lifetime is Expires minus Date, or a tenth of Date minus Last-Modified, computed on unsigned ticks without comparing them first, and an entry is fresh while its age is below that lifetime, as in firmware 13.60, read from disassembly, not measured on a console. An Expires earlier than Date, or a Last-Modified later than Date, therefore wraps to a lifetime that never runs out, so the entry keeps being returned as a hit instead of going stale as RFC 9111 asks; this is kept to match the console.