for every request, several hash lookups are done for the path or file extension.
maybe somehow cache this so only a singe lookup gives several flags/cached values.
test if that is faster or not, as more memory usage could weaken cpu caches.
create a new map "path_flags" that contains an integer with flags or an object in it to replace most hash lookups for most requests.