Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

319
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda