[STG-1482] Update caching docs: split into Browserbase Cache and Local Cache sections#1770
[STG-1482] Update caching docs: split into Browserbase Cache and Local Cache sections#1770derekmeegan wants to merge 3 commits intomainfrom
Conversation
|
…ation, remove em dashes
There was a problem hiding this comment.
cubic analysis
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Linked issue analysis
Linked issue: STG-1482: Update caching docs: split into Browserbase Cache and Local Cache sections
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Remove the disclaimer about server caching | Removed block and integrated into Browserbase section text |
| ✅ | Create two clear sections: Browserbase Cache and Local Cache | Headings renamed to 'Browserbase Cache' and 'Local Cache' |
| ✅ | Add code snippets and descriptions for each caching strategy | Descriptions added and existing act()/agent()/cacheDir examples preserved |
Architecture diagram
sequenceDiagram
participant App as User Script
participant SDK as Stagehand SDK
participant FS as Local FileSystem
participant BB as Browserbase API
participant LLM as LLM Provider
Note over App,LLM: Runtime Caching Strategy Flow
App->>SDK: act() / extract() / agent()
== Local Cache Check ==
opt if cacheDir is provided
SDK->>FS: NEW: Check for cached file (hash of inputs)
alt Local HIT
FS-->>SDK: Return cached result
SDK-->>App: Return Result (Instant)
end
end
== Execution / Remote Cache ==
Note right of SDK: Local MISS or no cacheDir
alt env: "BROWSERBASE"
SDK->>BB: CHANGED: Request execution (act/extract/observe)
BB->>BB: CHANGED: Check Browserbase Cache (Managed)
alt Browserbase HIT
BB-->>SDK: Return result + cacheStatus: "HIT"
else Browserbase MISS
BB->>LLM: Execute inference
LLM-->>BB: Response
BB->>BB: Store in Managed Cache
BB-->>SDK: Return result + cacheStatus: "MISS"
end
else env: "LOCAL"
SDK->>LLM: Execute inference
LLM-->>SDK: Response
end
== Persistence ==
opt if cacheDir is provided
SDK->>FS: NEW: Write result to local file
end
SDK-->>App: Return Final Result
Greptile SummaryImproved caching documentation clarity by renaming sections to "Browserbase Cache" and "Local Cache", removing redundant notes, and adding helpful use-case bullets for Local Cache. All code examples and functionality preserved.
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 75bca72 |
Summary
Restructures the caching best practices docs page into two clear sections:
Changes
env: "BROWSERBASE"— this is now naturally conveyed in the section descriptionWhat stays the same
Only modifies
packages/docs/v3/best-practices/caching.mdx.Linear: https://linear.app/browserbase/issue/STG-1482