Problem/Motivation
In #3375423: Deprecate file_managed_file_save_upload(), file_save_upload() and _file_save_upload_from_form() and replace with a service we are modernising file uploads. The static $upload_cache;
seems unnecessary, and it is worth checking this before refactoring the code.
The comments say:
" // Return cached objects without processing since the file will have
// already been processed and the paths in $_FILES will be invalid."
This issue is to evaluate whether this is still needed.
Steps to reproduce
Remove the cache and check if tests still pass.