EdgeRouter - 웹 캐시를 설정하기

download at 2017-09-20T18:54:06Z origin

웹 캐싱 - CLI 명령어

웹 캐싱을 설정하기 위해서 다음 명령어를 입력합니다:

set service webproxy listen-address <ip address>
set service webproxy cache-size <size>
set service webproxy mem-cache-size <size>

현재 가능한 통계치를 확인하기 위해서는 루프백 주소(listen-address)를 추가해야 합니다. squidclient mgr:info 명령어를 사용하세요:

configure
set service webproxy listen-address 127.0.0.1
commit
save
exit

ubnt@sj-lab:~$ squidclient mgr:info
HTTP/1.0 200 OK
Server: squid/3.1.6
Mime-Version: 1.0
Date: Mon, 29 Oct 2012 23:24:01 GMT
Content-Type: text/plain
Expires: Mon, 29 Oct 2012 23:24:01 GMT
Last-Modified: Mon, 29 Oct 2012 23:24:01 GMT
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Via: 1.0 localhost (squid/3.1.6)
Proxy-Connection: close
Squid Object Cache: Version 3.1.6
Start Time:    Mon, 29 Oct 2012 23:22:05 GMT
Current Time:  Mon, 29 Oct 2012 23:24:01 GMT
<SNIP>
Cache information for squid:
Hits as % of all requests: 5min: 0.0%, 60min: 0.0%
Hits as % of bytes sent:   5min: 30.8%, 60min: 30.8%
Memory hits as % of hit requests:  5min: 0.0%, 60min: 0.0%
Disk hits as % of hit requests:    5min: 0.0%, 60min: 0.0%
Storage Swap size: 0 KB
Storage Swap capacity:  0.0% used,  0.0% free
Storage Mem size:  104 KB
Storage Mem capacity:   0.0% used,  0.0% free
Mean Object Size:  0.00 KB
Requests given to unlinkd: 0
<SNIP>

info_i_25x25.png

Note

EdgeOS에서의 모든 'set' 명령어는 환경설정에서 제거될 수 있습니다. 'set' 대신에 'delete' 구문 사용을 권장합니다.