Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add HTTP Cache Override Support

Đang mở
#54 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Bắt đầu bằng cách so sánh các API cache-override được tham chiếu của Rust, Go và JavaScript với tài liệu Fastly HTTP Cache và RFC 9111. Xác định wrapper Python và phần tích hợp Request/Response của nó, sau đó xác thực việc phân tích tùy chọn, xử lý TTL, định dạng surrogate-key và khả năng cache HTTP mà không kiểm thử tính bền vững của bộ nhớ cache máy chủ hoặc hành vi hit/miss.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
5
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fastly/compute-sdk-python

Tất cả issue của fastly/compute-sdk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.