오징어 - URL을 사용하여 Squid-Cache에서 캐시 개체를 제거 할 수 있습니까?

StackOverflow https://stackoverflow.com//questions/9614994

  •  09-12-2019
  •  | 
  •  

문제

나는 오징어 - 캐시에 새로운 기능입니다.HTTP URL을 사용하여 개체를 제거하는 것을 찾고 있습니다.

http://$cacheuser$:$cachepassword$@$cache$:8081/CE/Delete/<protocol>/<machine-name>/<folder>/<file>
.

이것은 제대로 작동합니다.오징어는 URL을 통해 이러한 종류의 퍼지를 지원합니까?

감사합니다.

도움이 되었습니까?

해결책

HTTP 요청을 수신하고 SquidClient를 실행하는 캐시 시스템에서 CGI 스크립트를 호스팅했습니다.

use CGI qw(:standard); 

$urltopurge=param("url"); 

print $urltopurge;

print header(); 

print "Trying to purge <b>$urltopurge</b><P>"; 

print "sending command <B>squidclient -v -m PURGE -h 172.24.133.181 -p 8081 $urltopurge</b> to proxy server<P><HR><b>Server Response:</b><P>"; 

$result = system ("C:\\squid\\bin\\squidclient.exe -v -m PURGE -p 8081 $urltopurge"); 

print $result;

print "<hr>"; 

print "purger.cgi - Praveen"; 
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top