-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible error with Cache-Control caching #594
Comments
Vou responder em pr-br dado que é o padrão adotado pelo projeto e não temos objetivo de fomentar a criação de issues e PRs em outra língua ^^ (o código e commits ainda gosto de manter em ingles) Vc tem total razão! Estamos fazendo cache de erros 😢 |
Quando solicito uma req usando ?test deveria forcar uma nova conexao, sem uso de cache, ou nao? // 20240308095409 { Anteriormente, estava tendo o mesmo erro devido ao cache da aplicação usei o ?test e resolveu temporariamente, agora quando voltei a usar pelo método tradicional ele apresenta novos erros. // 20240308091121 { |
Notei tbm que tanto na API v1 e V2 de cep, quando faço a requisição com ou sem o "-", ele me retorna situações diferentes, algo que anteriormente também não acontecia. Sem "-": Com "-"; { |
desculpa a demora para responder (e de volta ao pt-BR como foi sugerido). o que acha então @lucianopf de mantermos a cache apenas para os status 200, 400 e 404, removendo ela do status 500? posso fazer um PR para isso logo logo. |
I was wondering if this line could cause issues by caching a possibly failed execution in the try/catch block below.
If I'm not mistaken, by setting the Cache-Control header, Vercel will cache the response of the request no mater its status, being 200 or 500. So in case the execution flow falls into the catch block, a response with an error may be cached by the CDN, causing further requests to hit that caching mechanism and receiving an error response.
Is this a farfetched thought or it may be the cause of some issues?
BrasilAPI/pages/api/cep/v2/[cep].js
Line 18 in 324fcfd
The text was updated successfully, but these errors were encountered: