프로그램 사용/squid2019. 2. 18. 17:44

묘하게 비문인가. 오타인가 이해가 안되고 번역도 잘 안되고...


min / percent / max는 명시적 만료시간(explicit expiry time)이 정의되지 않은 애들에 대한 설정으로  

패킷캡쳐를 해보니 HTTP 내부에 이런 식으로 응답이 오는 걸 확인하였는데

요기에 expires나 Cache-Control : max-age 등에 값이 없을 경우에 대한 녀석으로 생각된다.

[링크 : https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html]


usage: refresh_pattern [-i] regex min percent max [options]


By default, regular expressions are CASE-SENSITIVE.  To make

them case-insensitive, use the -i option.

>>>>>

기본적으로 정규표현식은 대소문자를 구분합니다. 대소문자를 구분하지 않으려면 -i 옵션을 사용하시기 바랍니다.


'Min' is the time (in minutes) an object without an explicit

expiry time should be considered fresh. The recommended

value is 0, any higher values may cause dynamic applications

to be erroneously cached unless the application designer

has taken the appropriate actions.

>>>>>

'Min' 명시적 만료시간이 존재하지 않는 객체에 대해 신선하다고 간주되어야 할 시간 (분단위) 입니다.

추천되는 값은 0으로, 그 이상의 값은 어플리케이션 디자이너가 적절한 행동을 취해야하지 않는다면

다이나믹 어플리케이션에서 오류가 있는 캐시를 야기할 수 있습니다.

(다이나믹 웹에서 갱신되지 않는 옛 데이터를 캐시할 수 있다?)


'Percent' is a percentage of the objects age (time since last

modification age) an object without explicit expiry time

will be considered fresh.

>>>>>

'Percent'는 명시적 만료시간이 존재하지 않는 객체에 대해 신선하다고 간주되어야 할 나이(마지막 수정일로 부터의 나이)의 비율입니다.

(나중에 나올 LM Factor 인가?)


'Max' is an upper limit on how long objects without an explicit

expiry time will be considered fresh. The value is also used

to form Cache-Control: max-age header for a request sent from

Squid to origin/parent.

>>>>>

'Max' 명시적 만료시간이 존재하지 않는 객체에 대해 신선하다고 간주되어야 할 상한선 입니다.

이 값은  Squid로 부터 origin/parent로 요청되는 양식 Cache-Control: max-age 헤더로부터 사용됩니다.


options: override-expire

override-lastmod

reload-into-ims

ignore-reload

ignore-no-store

ignore-private

max-stale=NN

refresh-ims

store-stale


override-expire enforces min age even if the server

sent an explicit expiry time (e.g., with the

Expires: header or Cache-Control: max-age). Doing this

VIOLATES the HTTP standard.  Enabling this feature

could make you liable for problems which it causes.

>>>>>

override-expire 는 서버가 명시적 만료시간을 보내더라도 min age를 강제합니다.(예 Expires: header 혹은 Cache-Control: max-age).

이것은 HTTP 표준을 위반합니다. 이 기능을 활성화 시키면 그것으로부터 야기되는 문제들에 대해 책임을 져야합니다.


Note: override-expire does not enforce staleness - it only extends

freshness / min. If the server returns a Expires time which

is longer than your max time, Squid will still consider

the object fresh for that period of time.

>>>>>

알림 : override-expire는 부패를 강제 하지 않습니다 - 단지 신선함에 대한 min 시간을 늘립니다.

당신의 최고 시간보다 긴 만료시간을 서버가 보낸다면, Squid는 그 기간 동안은 신선함으로 판단할 것입니다.


override-lastmod enforces min age even on objects

that were modified recently.

>>>>>

override-lastmod는 최근 수정되었다 하더라도 객체에서 min 값을 강제합니다.


reload-into-ims changes a client no-cache or ``reload''

request for a cached entry into a conditional request using

If-Modified-Since and/or If-None-Match headers, provided the

cached entry has a Last-Modified and/or a strong ETag header.

Doing this VIOLATES the HTTP standard. Enabling this feature

could make you liable for problems which it causes.

>>>>>

reload-into-ims는 클라이언트의 Cache-Control : no-cache나 

캐시된 항목을 위해 요청되는 

캐쉬된 항목이 지니는 Last-Modified 와/나 강력한 ETag 헤더에 의해 제공되는

IMS(If-Modified-Since) 와/나 INM(If-None-Match) 헤더들로 부터의

조건부 요청에 의한 reload 요청을 변화합니다.


ignore-reload ignores a client no-cache or ``reload''

header. Doing this VIOLATES the HTTP standard. Enabling

this feature could make you liable for problems which

it causes.

>>>>>

ignore-reload는 클라이언트의 no-cache나 reload 헤더를 무시합니다.

이것은 HTTP 표준을 위반합니다. 이 기능을 활성화 시키면 그것으로부터 야기되는 문제들에 대해 책임을 져야합니다.


ignore-no-store ignores any ``Cache-control: no-store''

headers received from a server. Doing this VIOLATES

the HTTP standard. Enabling this feature could make you

liable for problems which it causes.

>>>>>

ignore-no-store는 서버로 부터 받아지는 어떠한 'Cache-control: no-store' 헤더도 무시하도록 합니다.

이것은 HTTP 표준을 위반합니다. 이 기능을 활성화 시키면 그것으로부터 야기되는 문제들에 대해 책임을 져야합니다.


ignore-private ignores any ``Cache-control: private''

headers received from a server. Doing this VIOLATES

the HTTP standard. Enabling this feature could make you

liable for problems which it causes.

>>>>>

ignore-private는 서버로 부터 받아지는 어떠한 'Cache-control: private' 헤더도 무시하도록 합니다.

이것은 HTTP 표준을 위반합니다. 이 기능을 활성화 시키면 그것으로부터 야기되는 문제들에 대해 책임을 져야합니다.


refresh-ims causes squid to contact the origin server

when a client issues an If-Modified-Since request. This

ensures that the client will receive an updated version

if one is available.

>>>>>

refresh-ims는 클라이언트가 IMS(If-Modified-Since) 요청을 발행하였을때 원본 서버로 부터 squid의 접속을 발생하도록 합니다.

이것은 클라이언트가 가능하다면 업데이트 된 버전을 받도록 보장합니다.


store-stale stores responses even if they don't have explicit 

freshness or a validator (i.e., Last-Modified or an ETag) 

present, or if they're already stale. By default, Squid will 

not cache such responses because they usually can't be

reused. Note that such responses will be stale by default.

>>>>>

store-stale 는 명시적인 신선함이나 감별자 (예로 Last-Modified 혹은 ETag)존재가 없거나 혹은 그것들이 이미 신선하지 않더라도 응답을 저장합니다.

그것들이 대부분 재사용될 수 없기 때문에, 기본적으로 Squid는 이러한 응답들을 캐시하지 않을 것입니다.


max-stale=NN provide a maximum staleness factor. Squid won't

serve objects more stale than this even if it failed to

validate the object. Default: use the max_stale global limit.

>>>>>

max-stale=NN은 최대 부패 요소를 제공합니다. Squid는 객체를 입증하는데 실패하더라도, 이 값 보다 더 부패한 객체에 대해서 제공하지 않을 것입니다. 

기본값 : max_stale 전역 제한을 사용합니다.


결론 : 번역해서 먼소리인지 모르겠다!!!!


+

HTTP 프로토콜을 들여다 보게 될 줄이야 ㅠㅠ

전부 Cache-Control 하위 설정들이었구나..

캐시 요청 디렉티브

Cache-Control: max-age=<seconds>

Cache-Control: max-stale[=<seconds>]

Cache-Control: min-fresh=<seconds>

Cache-control: no-cache 

Cache-control: no-store

Cache-control: no-transform

Cache-control: only-if-cached 

[링크 : https://developer.mozilla.org/ko/docs/Web/HTTP/Headers/Cache-Control]

'프로그램 사용 > squid' 카테고리의 다른 글

HSTS-HTTP Strict Transport Security / squid  (0) 2019.02.25
squid as transparent proxy  (0) 2019.02.19
squid LM-factor? (Last Modified)  (0) 2019.02.18
squid access log 종류..  (2) 2019.02.17
mrtf centos  (0) 2019.02.14
Posted by 구차니
Programming/angular2019. 2. 18. 17:09

아래와 같은 에러가 발생을 하면서 ie로 확인하면 안되는 경우 

SCRIPT5022: 예외가 발생했지만 catch할 수 없습니다.

polyfills.-------------.bundle.js (1,57771) 


요렇게 하면 된다더라.. (라고 발빼기)

src\polyfills.ts :


/** IE9, IE10 and IE11 requires all of the following polyfills. **/

import 'core-js/es6/symbol';

import 'core-js/es6/object';

import 'core-js/es6/function';

import 'core-js/es6/parse-int';

import 'core-js/es6/parse-float';

import 'core-js/es6/number';

import 'core-js/es6/math';

import 'core-js/es6/string';

import 'core-js/es6/date';

import 'core-js/es6/array';

import 'core-js/es6/regexp';

import 'core-js/es6/map';

import 'core-js/es6/set'; 

[링크 : https://stackoverflow.com/questions/45353619/angular4-application-running-issues-in-ie11]


링크에 의하면 기본값으로 IE9~IE11 호환을 하지 않도록 되어 있어서 발생하는 것으로 추측된다.

'Programming > angular' 카테고리의 다른 글

angular 빌드 최적화(?)  (0) 2019.03.18
angular with reverse proxy  (0) 2019.03.18
angular proxy  (0) 2018.11.02
vscode 및 angular.js 셋팅..  (0) 2018.08.08
Posted by 구차니
프로그램 사용/squid2019. 2. 18. 10:56

이건 또 언제보냐..

일단 뒤에 squid 번역해 보고 나니 조금 이해 되는 듯 한데

이해한 걸 적자면.. ILM(If-Last-Modified) 으로 설정되었을 경우

(현재 시간 - LastModified 시간) * Percent(Squid에서 설정되는 그 값)가 Fresh 하다고 간주되는 시간이다.

근데... 현재 시간이 그럼 늦게 접속하면.. 오랜시간 동안 변하지 않았으니

Fresh로 오랫동안 간주해도 된다는 의미인가?

2019/02/18 - [프로그램 사용/squid] - 끄으으응.. squid 번역을 한번 했어야 했나.. refresh_pattern


The response is stale if the response age is greater than the refresh_pattern max value.

refresh_pattern max 값 보다 응답 시간이 클 경우 응답은 부패한 것 으로 간주합니다.


The response is fresh if the LM-factor is less than the refresh_pattern percent value.

refresh_pattern percent 값 보다 LM-factor가 적을 경우 응답은 신선한 것 으로 간주합니다.


The response is fresh if the response age is less than the refresh_pattern min value.

refresh_pattern min 값 보다 응답 시간이 적을 경우 응답은 신선한 것 으로 간주합니다.


Otherwise, the response is stale.

그 외에는 응답은 부패한 것으로 간주합니다. 


override-expire

When set, this option causes Squid to check the min value before checking the Expires header. Thus, a non-zero min time makes Squid return an unvalidated cache hit even if the response is preexpired.

이 옵션은 Squid가 Expire 헤더를 확인하기 전에 min 값을 확인하도록 설정합니다. 그러므로 0이 아닌 min 값은 Squid가 응답이 만료되기 전이라도 캐시 적중을 무효화 하게 됩니다.


override-lastmod

When set, this option causes Squid to check the min value before the LM-factor percentage.

이 옵션은 Squid가 LM-factor 퍼센트 보다 먼저 min 값을 확인하도록 설정합니다.


reload-into-ims

When set, this option makes Squid transform a request with a no-cache directive into a validation (If-Modified-Since) request. In other words, Squid adds an If-Modified-Since header to the request before forwarding it on. Note that this only works for objects that have a Last-Modified timestamp. The outbound request retains the no-cache directive, so that it reaches the origin server.

이 옵션은 Squid가 no-cache 지시어가 있는 요청을 유효한 (IMS If-Modified-Since)요청으로 변환하도록 설정합니다. 다르게 말하자면, Squid는 IMS(If-Modified-Since) 헤더를 덧붙여서 전달합니다. 이 설정은 Last-Modified 타임스탬프가 존재하는 객체에 대해서만 작동합니다. 

아웃바운드 요청은 no-cache 지시어를 유지하며, 원본 서버에 도달하게 됩니다.


ignore-reload

When set, this option causes Squid to ignore the no-cache directive, if any, in the request.

이 옵션은 Squid가 no-cache 지시어를 무시하도록 설정합니다. 

[링크 : http://etutorials.org/.../Chapter+7.+Disk+Cache+Basics/7.7+refresh_pattern/]

'프로그램 사용 > squid' 카테고리의 다른 글

squid as transparent proxy  (0) 2019.02.19
끄으으응.. squid 번역을 한번 했어야 했나.. refresh_pattern  (0) 2019.02.18
squid access log 종류..  (2) 2019.02.17
mrtf centos  (0) 2019.02.14
squid cache hit rate 올리기  (0) 2019.02.14
Posted by 구차니