INNER CODE UNIT · Python

_entry_headers

redis/fastapi-redis-sdk · src/redis_fastapi/cache.py:423

def _entry_headers(entry: dict[str, Any]) -> list[tuple[str, str]]:
    """Return an entry's stored header pairs, in the order they were received.

    Args:
        entry: The decoded cache entry.

    Returns:
        ``(name, value)`` pairs.

    Raises:
        KeyError: If the entry carries no header block.  The caller treats
            that as a miss rather than serving a shape it cannot read.
    """
    return [(name, value) for name, value in entry["headers"]]


def _is_not_modified(
    request: Request, etag: str, stored: list[tuple[str, str]]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…