Olá, essa dica é para forçar o cache dos arquivos do
WindowsUpdate, certamente não é a solução correta, que seria implantar o
WSUS no ambiente, mas ajuda muito quem não tem como utilizar essa solução.
No arquivo de configuração do
Squid adicione as seguintes linhas:
Primeiro, vamos setar as políticas de reposição do nosso cache:
 #politicas de reposicao
;
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
Não esquecer de definir o tamanho máximo do arquivo em cache, nos meus ambientes costumo definir 300MB:
 #Tamanho maximo do objeto para ser armazenado em cache
;
maximum_object_size 300 MB
Informar os endereços e arquivos para forçar o cache:
#Cache windowsupdate
refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern www.download.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern www.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 4320 100% 43200 reload-into-ims
refresh_pattern download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 4320 100% 43200 reload-into-ims
refresh_pattern cache.pack.google.com/.*\.(cab|exe|dll|msi|psf) 4320 100% 43200 reload-into-ims
refresh_pattern www.update.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern www.download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
Efetue um reload no Squid. Aqui um exemplo de estações obtendo os arquivos do cache:
1302852973.216 0 192.168.100.39 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302852979.740 0 192.168.100.39 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302853316.290 0 192.168.100.12 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302853523.151 0 192.168.100.11 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302853539.457 0 192.168.100.11 TCP_MEM_HIT/200 407 HEAD http://download.windowsupdate.com/v9/microsoftupdate/redir/muv4muredir.cab? – NONE/- application/octet-st
ream
1302853952.972 0 192.168.100.11 TCP_MEM_HIT/200 407 HEAD http://download.windowsupdate.com/v9/microsoftupdate/redir/muv4muredir.cab? – NONE/- application/octet-st
ream
1302853953.344 0 192.168.100.11 TCP_MEM_HIT/200 407 HEAD http://download.windowsupdate.com/v9/microsoftupdate/redir/muv4muredir.cab? – NONE/- application/octet-st
ream
1302853962.309 1 192.168.100.11 TCP_HIT/206 9492 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccdef
c08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853964.399 1 192.168.100.11 TCP_HIT/206 10039 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccde
fc08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853965.429 1 192.168.100.11 TCP_HIT/206 9485 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccdef
c08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853966.453 2 192.168.100.11 TCP_HIT/206 21016 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccde
fc08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853967.459 4 192.168.100.11 TCP_HIT/206 43112 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccde
fc08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853968.477 7 192.168.100.11 TCP_HIT/206 87345 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccde
fc08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853969.507 14 192.168.100.11 TCP_HIT/206 176664 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccd
efc08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302853970.519 21 192.168.100.11 TCP_HIT/206 260214 GET http://download.windowsupdate.com/msdownload/update/software/defu/2011/04/am_delta_patch3_fb4b9506d3c5f6ccd
efc08a67d46bfccb54f155e.exe – NONE/- application/octet-stream
1302854557.026 0 192.168.100.38 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302854563.738 0 192.168.100.38 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/microsoftupdate/redir/muv4muredir.cab? – NONE/- application/octet-st
ream
1302854629.207 0 192.168.100.34 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302854634.247 0 192.168.100.34 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/windowsupdate/redir/muv4wuredir.cab? – NONE/- application/octet-stre
am
1302855837.559 0 192.168.100.11 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/microsoftupdate/redir/muv4muredir.cab? – NONE/- application/octet-st
ream
1302855838.175 0 192.168.100.11 TCP_MEM_HIT/200 408 HEAD http://download.windowsupdate.com/v9/microsoftupdate/redir/muv4muredir.cab? – NONE/- application/octet-st
ream
Obrigado!
Fabio Soares Schmidt
http://respirandolinux.wordpress.com