We are working on the Algorithmic Complexity Denial-of-Service problem and detected a performance bug from your code.
We didn’t create a pull request because we're not sure whether this bug can be triggered from the user interface. We also do not understand the functionality of this code snippet as you do. Thanks for your understanding.
Outcome
In DynamicCacheLoader.java the method getResByUrl would take more time for specific input.
Reasons
The getResByUrl function traverses the given path to find the file matching the Url. For a recursive directory, it would take more time than average situation.
Suggestion
The getResByUrl function only checks the file name to match the Url. We suggest that the entire path of result file should be checked, which would avoid tranverse in the wrong directory and reduce the recursion times greatly. For a directory of perfect k-ary tree with n depth, the recursion times would be less than n instead of k^n.