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

161
Visualizações
NodeJS route changes not being updated but new routes work properly

I need to make some changes in an old legacy code which I don't know much about, and I'm experiencing something very confusing.

the route is defined like this

app.get('/getMapProduct',billing.getMapProdut);

and I need to change to content being returned in from the function billing.getMapProdut I changed the logic of the function but calling the route still returns according to the old logic.

I added a new route calling the same function

app.get('/test',billing.getMapProdut);

and it returns like expected, with the new logic.

Next, I've tried to change the name of the original function to:

app.get('/getMapProducttt',billing.getMapProdut);

getMapProducttt doesn't work (not found), the old route still works.

The next try is the most weird to me, I've tried adding a new route called getMapProducttt, but unlike test, this one didn't work. Yet, adding a route called getMapProd does work like test.

Next, I've tried commenting out the original route, but, you guessed it, still works. I've also tried changing the name of the entire file containing all of the routes. The 'test' one doesn't work anymore, but the 'getMapProduct' still works.

I've searched the entire codebase, there's no other definition of a route called getMapProduct, and no other definition of the function being called from it, getMapProdut.

The only direction I'm able to think of is some sort of weird cache mechanism, but I can't think of where or how is it defined.

I'm afraid it might be something really silly, but I can't think of anything. any ideas?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This was eventually really silly, though still some of the scenarios that happened aren't clear to me. It was a weirdly setup cache on the CloudFront

over 4 years ago · Santiago Trujillo Relatório
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