a-luna / fastapi-redis-cache

A simple and robust caching solution for FastAPI that interprets request header values and creates proper response header values (powered by Redis)
MIT License
152 stars 24 forks source link

Add support for caching Pydantic models #65

Open HakierGrzonzo opened 2 years ago

HakierGrzonzo commented 2 years ago

Hi!

I encountered an error while trying to use this library for a university research project while caching a list of pydantic models. So I added functionality to the library to automatically convert pydantic objects into lean json.

I made a test for my fix.