Closed ykyki closed 2 weeks ago
Hi @ykyki
This is not a typo. It works well with app.get()
.
Thanks @yusukebe .
After a quick check, I found that app.get()
worked well.
However, app.use()
also seems to work correctly.
I was under the impression that app.use()
was more suitable for middlewares.
Is there any criterion for determining which approach is more appropriate?
Hi @ykyki
I intended to apply cache middleware only for GET requests in this document, which is useful for real-world examples.
@yusukebe
I understood your intention.
In light of that, app.get()
is indeed more appropriate than app.use()
for this case.
I intend to withdraw this PR. Thank you for your guidance.
This PR fixes minor typos in
cache.md
. https://hono.dev/middleware/builtin/cache