Add HTTP Cache Override Support
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Start by comparing the referenced Rust, Go, and JavaScript cache-override APIs with the Fastly HTTP Cache documentation and RFC 9111. Define the Python wrapper and its Request/Response integration, then validate option parsing, TTL handling, surrogate-key formatting, and HTTP cacheability without testing host cache persistence or hit/miss behavior.
Written by the indexing model from the issue text.
Description
Overview
Add support for Fastly's HTTP Cache API, providing HTTP-aware caching with request/response handling and RFC 9111 compliance helpers.
WIT Interface
The WIT interface for http-cache is large, not included inline here.
API Design
- Implement
HttpCacheEntryresource wrapper for HTTP-aware cache operations - Provide HTTP Request/Response integration (wraps core cache with HTTP types)
- Helper functions:
is_request_cacheable(), suggested options generators - Support RFC 9111 compliance patterns
- Cache override capabilities (TTL, stale-while-revalidate, surrogate keys)
Cross-SDK Comparison: Rust uses Request::set_cache_override() with enum variants (None/Pass/Override). Go and JS integrate cache override into request configuration. Python should provide similar enum-based API (CacheOverride.none(), .pass_(), .override(ttl=..., surrogate_key=...)).
Viceroy Testing
Viceroy's HTTP cache implementation follows similar limitations to Core Cache. Testing focus should be on:
- Verifying cache override API calls work correctly
- Testing SDK wrapper logic (option parsing, TTL handling, surrogate key formatting)
- Ensuring HTTP cacheability checks function properly
- Validating integration with Request/Response objects
Do NOT:
- Try to verify actual cache behavior or persistence
- Create elaborate tests around Viceroy's stubbed caching
- Test cache hit/miss scenarios (this is host behavior, not SDK code)
The goal is to verify our Python wrapper code works, not to test Viceroy's cache implementation.
Reference
- Dominant language
- Python
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fastly/compute-sdk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fastly/compute-sdk-python#116 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fastly/compute-sdk-python#98 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
fastly/compute-sdk-python#74 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
fastly/compute-sdk-python#61 ·
-
fastly/compute-sdk-python#60 · 1 assignee ·
All issues in fastly/compute-sdk-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·