tessl install tessl/pypi-hishel@0.1.0Persistent cache implementation for httpx and httpcore following RFC 9111 specification
Agent Success
Agent success rate when using this tile
74%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.48x
Baseline
Agent success rate without this tile
50%
Build a cache manager for an HTTP API client that needs different caching strategies for different types of requests.
Your task is to implement a cache manager that configures HTTP caching with three distinct policies:
Create a cache configuration for public API endpoints that:
Create a cache configuration for user-specific endpoints that:
Create a cache configuration for search endpoints that:
Cache-Control: private @testCache-Control: private @test@generates
def create_public_cache():
"""
Creates a cache configuration for public API endpoints.
Returns:
A configured cache object suitable for shared caching that only
caches GET/HEAD requests and never serves stale content.
"""
pass
def create_private_user_cache():
"""
Creates a cache configuration for user-specific endpoints.
Returns:
A configured cache object suitable for private caching that caches
GET/HEAD/POST requests and allows serving stale content.
"""
pass
def create_search_cache():
"""
Creates a cache configuration for search endpoints.
Returns:
A configured cache object suitable for private caching of POST requests
that requires revalidation of stale content.
"""
passProvides HTTP caching support with RFC 9111 compliance.