https://github.com/tatevik-h/fastapi-redis-cache
FastAPI + Redis: Advanced caching service
https://github.com/tatevik-h/fastapi-redis-cache
caching cli-tool docker fastapi python redis rest-api sqlalchemy
Last synced: about 2 months ago
JSON representation
FastAPI + Redis: Advanced caching service
- Host: GitHub
- URL: https://github.com/tatevik-h/fastapi-redis-cache
- Owner: tatevik-h
- Created: 2025-09-22T06:34:14.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-09-22T08:40:32.000Z (9 months ago)
- Last Synced: 2025-09-22T09:24:28.780Z (9 months ago)
- Topics: caching, cli-tool, docker, fastapi, python, redis, rest-api, sqlalchemy
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastapi-redis-cache
FastAPI + Redis: Advanced caching service
## Features
- Payload generation & retrieval
- PostgreSQL persistence
- CLI tool for programmatic testing
## Requirements
- Python
- Docker & Docker Compose
- Redis
## API Endpoints
### 1. Create Payload
**POST /payload**
Generates a new payload (or reuses existing one if already cached).
- Transforms input strings
- Caches results in Redis & DB
- Returns a uinque payload ID
**Request body:**
```json
{
"list_1": ["first string”, “second string”, “third string”],
"list_2": ["other string”, “another string”, “last string”]
}
```
**Response:**
```json
{
"id": "payload_123abc"
}
```
### 2. Get Payload
**GET /payload/{id}**
Retrieves a previously generated payload by ID.
**Response:**
```json
{
"output": "FIRST STRING, OTHER STRING, SECOND STRING, ANOTHER STRING, THIRD STRING, LAST STRING"
}
```