Skip to content
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

Cache Router.match() ? #3651

Open
akku1139 opened this issue Nov 10, 2024 · 0 comments
Open

Cache Router.match() ? #3651

akku1139 opened this issue Nov 10, 2024 · 0 comments
Labels
enhancement New feature or request.

Comments

@akku1139
Copy link

What is the feature you are proposing?

Idea

It may be possible to speed up routing by caching the result of Router.match().

Prototype

  1. Modify HonoBase https://github.com/akku1139/hono/tree/routing-cache
  2. CacheRouter https://github.com/akku1139/hono/tree/cache-router

Worry

  • DoS attacks increase memory usage.
  • Hono's routers are fast enough without caching.
  • It is needed to clear the cache every time Router.add()for routes that use wildcards
@akku1139 akku1139 added the enhancement New feature or request. label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant