CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-requests-cache

tessl install tessl/pypi-requests-cache@1.2.0

A persistent cache for python requests

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.27x

Baseline

Agent success rate without this tile

60%

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how well the engineer uses requests-cache to implement client-side cache control through Cache-Control request directives (max-stale, min-fresh, only-if-cached). The focus is on proper usage of the CachedSession class and correct implementation of request-level cache control headers.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CachedSession initialization",
      "description": "Uses requests_cache.CachedSession to create a cached HTTP session with appropriate configuration (e.g., backend, expire_after settings)",
      "max_score": 15
    },
    {
      "name": "max-stale implementation",
      "description": "Correctly implements max-stale directive by setting Cache-Control headers in requests with 'max-stale' or 'max-stale=<seconds>' to accept stale responses within the specified threshold",
      "max_score": 25
    },
    {
      "name": "min-fresh implementation",
      "description": "Correctly implements min-fresh directive by setting Cache-Control headers in requests with 'min-fresh=<seconds>' to ensure responses remain fresh for the specified duration",
      "max_score": 25
    },
    {
      "name": "only-if-cached implementation",
      "description": "Correctly implements only-if-cached directive by setting Cache-Control headers in requests with 'only-if-cached' to prevent network requests when resource is not cached",
      "max_score": 20
    },
    {
      "name": "Request header construction",
      "description": "Properly constructs and passes Cache-Control headers to session.get() or similar methods using the 'headers' parameter with correctly formatted Cache-Control header values",
      "max_score": 10
    },
    {
      "name": "Cache management methods",
      "description": "Implements cache management functionality using CachedSession methods such as cache.clear(), cache.urls(), or accessing cache properties for inspection",
      "max_score": 5
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/requests-cache@1.2.x
tile.json