Online Book Reader

Home Category

Squid_ The Definitive Guide - Duane Wessels [191]

By Root 1957 0

Default

request_header_max_size 10 KB

Example

request_header_max_size 35 KB

Related

request_body_max_size, reply_body_max_size

Name

request_body_max_size

Synopsis

This directive, if nonzero, places an upper limit on the size of a client's HTTP request body. Most requests (i.e., GET requests) don't have request bodies. This directive applies to PUT and POST requests. A request that exceeds this limit generates a 413 (Request Entity Too Large) error response.

Syntax

request_body_max_size size-specification

Default

No limit

Example

request_body_max_size 100 KB

Related

request_header_max_size, reply_body_max_size

Name

refresh_pattern

Synopsis

This directive provides a way to customize Squid's algorithm for validating cached responses. HTTP has a relatively complex procedure for determining whether or not a cached response is fresh or stale. In some cases, origin servers provide an explicit expiration time. However, the majority of responses don't have this information. For these, Squid applies some heuristics to the response. See Section 7.7 for more information.

Syntax

refresh_pattern regex

mintime

percent

maxtime [options]

Default

refresh_pattern . 0 20% 4320

Example

refresh_pattern \.jpg$ 0 75 7200

Name

quick_abort_min

Synopsis

This directive controls Squid's behavior for requests aborted by the user. In some cases, Squid continues reading data from the origin server so that future requests may be satisfied as cache hits. If Squid knows that the transfer (between itself and the origin server) has no more than this many bytes remaining, it continues receiving the object. Otherwise, Squid checks the quick_abort_max setting next.

Syntax

quick_abort_min size-specification

Default

quick_abort_min 16 KB

Example

quick_abort_min 50 KB

Related

quick_abort_max, quick_abort_pct

Name

quick_abort_max

Synopsis

After checking quick_abort_min, Squid checks the value of this directive. If an aborted request has more than this many bytes remaining in the transfer, Squid terminates the connection to the origin server. Otherwise, it checks the quick_abort_pct setting.

Syntax

quick_abort_max size-specification

Default

quick_abort_max 16 KB

Example

quick_abort_max 1 MB

Related

quick_abort_min, quick_abort_pct

Name

quick_abort_pct

Synopsis

Squid checks this value last, after checking quick_abort_max, for a transfer aborted by the user. If Squid has already received at least this percentage of the response, it continues reading the data from the origin server so the entire response is cached.

Syntax

quick_abort_pct percentage

Default

quick_abort_pct 95%

Example

quick_abort_pct 75%

Related

quick_abort_min, quick_abort_max

Name

negative_ttl

Synopsis

Squid takes the liberty of caching certain error responses, such as "connection refused" and 404 (Not Found) messages. In most cases, repeating the request again immediately is likely to result in the same error. This directive specifies how long Squid caches these errors. Cache hits for negatively cached responses are logged with TCP_NEGATIVE_HIT in access.log.

Syntax

negative_ttl time-specification

Default

negative_ttl 5 min

Example

negative_ttl_1 minute

Related

refresh_pattern

Name

positive_dns_ttl

Synopsis

Each and every DNS resource record carries an explicit TTL that specifies how long the information may be cached. In most situations, Squid has access to the TTL values and doesn't store DNS answers longer than allowed. This is certainly true when you use Squid's internal DNS implementation, which is enabled by default.

However, if you elect to use the (external) dnsserver processes, Squid may not receive TTL values for DNS answers. In this case, successful DNS answers are cached for the amount of time specified by this directive.

Syntax

positive_dns_ttl time-specification

Default

positive_dns_ttl 6 hours

Example

positive_dns_ttl 1 hour

Related

negative_dns_ttl

Name

negative_dns_ttl

Synopsis

This

Return Main Page Previous Page Next Page

®Online Book Reader