Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

317
Visualizações
Is it possible to cache values of functions in fastapi?

I have a route

def some_function(value):
   fetch metadata for value from another api .....
   return some_data


app.route("/"):
def something(value):
    data = call_function(value)
    process.. data...
    return data

I am wondering if there is a way to cache the output of some_function(value)

I have a front end calling this end point every few mins and the some_function fetches meta data on each calls. seems like a waste of a call, especially if the far away tool has been impected somehow. Is there a way to store the data and return quickly in this case?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda