pytorch/serve

Enabling HTTP caching of inference results

Open

#1 527 ouverte le 23 mars 2022

Voir sur GitHub
 (2 commentaires) (4 réactions) (1 assigné)Java (790 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (3 844 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Is your feature request related to a problem? Please describe.

Currently, TorchServe adds headers that prevent from caching the inference results: https://github.com/pytorch/serve/blob/30f83500b0850e26ec55581f48a9307b1986f9f9/frontend/server/src/main/java/org/pytorch/serve/util/NettyUtils.java#L187-L190

This prevents some reverse-proxies like nginx from caching the results

Describe the solution

It would be great to have a way to override this behavior, either from the model handler, or through some configuration key.

Describe alternatives solution

N/A

Guide contributeur