Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add HTTP Cache Override Support

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

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

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 HttpCacheEntry resource 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fastly/compute-sdk-python

All issues in fastly/compute-sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.