Created attachment 546 [details] use_sha_name.sh: script to link the filename-md5sum folder to the existing url-md5sum folder Microsoft downloads are cached based on the URL ($unique) rather than on the filename ($mirror). However, most downloads now contain an SHA1 hash in the filename. Windows Update on Windows 10 has proven to attempt to download the huge (6+GB/month) updates from multiple URLs, so that 6GB is multiplied by each mirror that is hit. The filename switch can easily be made with: if ( $source_url =~ m@.*[0-9a-f]{40}\.[^\.]+@i ) { $xlrator_url = &check_cache($source_url,$hostaddr,$username,"Microsoft",$mirror); } else { $xlrator_url = &check_cache($source_url,$hostaddr,$username,"Microsoft",$unique); } Of course, only doing that means that everything gets downloaded yet again. However, a cleanup script could rename the existing url-based-folder to be a filename-based-folder. NOTE: I did this via a symbolic link (scripted attached), but then I also had to allow SymLinks in apache. The script needs the helper file md5name.pl -----------md5name.pl---------- #!/usr/bin/perl $sourceurl=shift; $sourceurl =~ s@\%2b@+@ig; $sourceurl =~ s@\%2f@/@ig; $sourceurl =~ s@\%7e@~@ig; $uuid = `echo $sourceurl | md5sum`; $uuid =~ s/[^0-9a-f]//g; $uuid =~ s/([a-f\d]{8})([a-f\d]{4})([a-f\d]{4})([a-f\d]{4})([a-f\d]{12})/$1-$2-$3-$4-$5/; print $uuid; exit 0; ------------------------------
https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=329631dee9f0adfb512f48aac61bbfdfe8f09a7a
About to be released with c118
Core Update has been released, fixed.