CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-hishel

Persistent cache implementation for httpx and httpcore following RFC 9111 specification

74

1.48x
Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This criteria evaluates how well the engineer uses Hishel's state machine and caching capabilities to build a cache state tracking system. The focus is on correctly utilizing Hishel's caching client integrations, accessing cache metadata, and implementing proper cache state detection.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Caching Client Usage",
      "description": "Uses Hishel's caching HTTP client (AsyncCacheClient, SyncCacheClient, AsyncCacheTransport, or SyncCacheTransport) to wrap HTTP requests with caching capabilities.",
      "max_score": 25
    },
    {
      "name": "Cache Hit Detection",
      "description": "Correctly detects cache hits by checking the hishel_from_cache metadata field in response extensions or headers, which indicates the response was served from cache (FromCache state).",
      "max_score": 20
    },
    {
      "name": "Cache Miss Detection",
      "description": "Correctly identifies cache misses by detecting when hishel_from_cache is False or absent, indicating the request went to the origin server (CacheMiss state).",
      "max_score": 15
    },
    {
      "name": "Revalidation Detection",
      "description": "Correctly tracks revalidation operations by checking the hishel_revalidated metadata field, which indicates a stale cached response was revalidated with the origin (NeedRevalidation/NeedToBeUpdated states).",
      "max_score": 20
    },
    {
      "name": "Store Detection",
      "description": "Correctly detects when responses are stored in cache by checking the hishel_stored metadata field, which indicates the response was cached (StoreAndUse state).",
      "max_score": 15
    },
    {
      "name": "Storage Configuration",
      "description": "Properly configures a storage backend (e.g., SQLiteStorage, FileStorage) for the caching client to enable persistent or in-memory caching.",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-hishel

tile.json