2 ms·
The cache serves as a managed server-side layer in the Stagehand API, keyed to instruction, page content, and the options you provide. Model configuration is in
by wittydeveloper 5d ago
The cache serves as a managed server-side layer in the Stagehand API, keyed to instruction, page content, and the options you provide. Model configuration is intentionally excluded from the cache, so switching models does not invalidate it. If the page structure changes, the call does not result in a cache hit, and we revert to full inference. Additionally, any cached selector that no longer resolves will also revert, with self-healing disabled during replay.
Regarding the local file issue: currently, caching keys are based on a Browserbase session. This means that with a purely local browser, the cache option has no effect, and there’s nothing to verify. Each call returns metadata (including status, miss reason, threshold, count, and tokens saved) so you can observe churn rather than make guesses about it.