Best/fastest multiple suffix matching path_regexp or path *suffix

1. Caddy version (caddy version): v2.1.1 h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=

2. How I run Caddy:

systemd

a. System environment:

Ubuntu 18.04 container

d. My complete Caddyfile or JSON config:

Nginx match:

  location ~* \.(ico|jpg|jpeg|png|gif|svg|js|jsx|css|less|swf|eot|ttf|otf|woff|woff2)$ {

3. The problem I’m having:

Doing match for the above, is the beter/faster method to put that in a path_regexp or multiple path *ext grouped matches?

I’m not certain, but I think path will be slightly faster. But really, the performance difference should not be noticeable, it’ll be on the order of nanoseconds.

You can set up a benchmark to compare if you’re worried at all about it.

Thank you, So at least now I know there isn’t a specific known faster mechanism yet :wink:

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.