CutSolver icon indicating copy to clipboard operation
CutSolver copied to clipboard

Cache answers

Open ModischFabrications opened this issue 5 years ago • 3 comments

People that are trying this service out are likely to queue the same result multiple times. Caching these values will really save some execution time.

This is somehow relevant to #24

ModischFabrications avatar Apr 11 '20 11:04 ModischFabrications

Measure RAM size and performance for a comparison. Caching will result in some faster responses, but slows down every request and will increase ram usage.

ModischFabrications avatar Apr 15 '20 16:04 ModischFabrications

It would also be nice to get a "/cached" path to debug successful caching and offer "offline" solutions

Remember to add a "cached" field to response object

ModischFabrications avatar Oct 22 '22 20:10 ModischFabrications

Problem: Uvicorn will spawn different processes in parallel, which will have difficulties keeping a shared cache. Redis and other external solutions might be nice, but have huge overhead. Might be able to cache requests in middleware before passing them to backend

ModischFabrications avatar Oct 22 '22 20:10 ModischFabrications