• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ninoseki / eml_analyzer / 16320016608

16 Jul 2025 12:53PM UTC coverage: 82.247% (+0.01%) from 82.235%
16320016608

push

github

web-flow
Add flag to toggle cache list visibility (#256)

1 of 2 new or added lines in 2 files covered. (50.0%)

1274 of 1549 relevant lines covered (82.25%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/backend/api/endpoints/cache.py
1
from fastapi import APIRouter, HTTPException, status
1✔
2

3
from backend import dependencies, settings
1✔
4

5
router = APIRouter()
1✔
6

7

8
@router.get(
1✔
9
    "/",
10
    response_description="Return cache keys",
11
    summary="Get analysis cache keys",
12
    description="Try to get analysis cache keys",
13
)
14
async def cache_keys(optional_redis: dependencies.OptionalRedis) -> list[str]:
1✔
NEW
15
    if optional_redis is None or not settings.REDIS_CACHE_LIST_AVAILABLE:
×
16
        raise HTTPException(
×
17
            status_code=status.HTTP_501_NOT_IMPLEMENTED,
18
            detail="Redis cache is not enabled",
19
        )
20

21
    byte_keys: list[bytes] = optional_redis.keys(f"{settings.REDIS_KEY_PREFIX}:*")  # type: ignore
×
22
    return [
×
23
        byte_key.decode().removeprefix(f"{settings.REDIS_KEY_PREFIX}:")
24
        for byte_key in byte_keys
25
    ]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc