Squid cache how long




















The question was because there are better solutions for Web pages. If you want to accellerate a web page Varnish is mich better. So you can remove single pages from your cache. Add a comment. Active Oldest Votes. The options are: private or public ; a private response is specific to a user and shouldn't be cached, a public response may be cached. Although after validation proved the resource is still valid a cached response could still be served.

Improve this answer. HBruijn HBruijn Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. When enabled, Squid counts the number of times each unique Via header occurs in client requests. The Via header contains a list of downstream proxies that have forwarded the request so far. When a proxy forwards a request, it should append its hostname and other identifying information to the Via header.

With the information in this database, you can, in theory, reconstruct the hierarchy of proxies forwarding requests through yours. Squid prints the Via database entries in a random order. The output may look something like this:. In this example, Squid received requests that previously passed through two other proxies nt04 and tasksmart.

Note that only proxies add a Via header. Requests from user-agents usually don't have the header and, therefore, aren't counted in this database. As you can see, the Via headers reveal some semiprivate information, such as hostnames, port numbers, and software versions.

Please take care to respect the privacy of your users if you enable this feature. The Via database is stored entirely in memory and is lost if Squid restarts. The database is cleared whenever you rotate the log files see Section Its value is a list of client IP addresses. In other words, when Squid receives and forwards a request, it appends the client's IP address to this header.

It is similar to Via because the header grows each time a proxy passes the request on towards the origin server. Each line begins with an integer, followed by a header value.

The integer indicates how many times that particular X-Forwarded-For value was received. The database is cleared each time you rotate Squid's log files. This page simply displays a listing of the other cache manager pages. You can use it if you forget the name of a page or if you want to know if certain optional pages are available. When using cachemgr. This is one of the few cache manager functions that doesn't simply display some information. Rather, this "page" allows you to shut down Squid remotely.

Without a password, the shutdown operation is disabled but you can still use squid -k shutdown. Because the cache manager has very weak securitypasswords are sent in cleartextI don't recommend enabling this operation. This is another function that allows you to control Squid, rather than simply receive information. It also requires a password see Section Squid reports the new setting on your screen and in cache. This page provides a lot of basic information about the way that Squid is operating.

It is a good starting point for using the cache manager and for tracking down performance problems. At the top, you'll see the release version e. Following that, you'll see seven different sections. The first section, Connection information , displays a few statistics about the number and rate of connections, and the number of cache clients:.

Number of clients accessing cache. Here, "client" actually means IP address. Squid assumes that each client has a unique IP address. Number of HTTP requests received. Number of ICP messages received. The total number of ICP messages received since Squid was started. Note, received messages includes both queries and responses. These values don't include HTCP messages, however. Number of ICP messages sent. The total number of ICP messages sent since Squid was started. Doesn't include HTCP messages.

Most likely, your sent and received counts will be about the same. Number of queued ICP replies. The sendto system call rarely fails, but if it does, Squid queues the ICP message for retransmission. This counter shows how many times an ICP message was queued for retransmission.

Most likely, you'll see 0 here. Request failure ratio. The failure ratio is a moving average ratio between the number of failed and successful requests. When this ratio exceeds 1. Thus, your neighbor caches that use ICP won't forward cache misses to you until the problem goes away. Average HTTP requests per minute since start. This value is simply the number of HTTP requests divided by the amount of time Squid has been running. This average doesn't reflect short-term variations in load.

To get a better instantaneous load measurement, use the 5min or 60min page. Average ICP messages per minute since start. The number of ICP queries received by Squid divided by the amount of time that it has been running. Select loop called. This number is probably meaningful only to Squid developers. It represents the number of times the select or poll function has been called and the average time between calls. During normal operation, the time between calls should be in the millisecond range.

The Cache information section displays hit ratio and cache size statistics:. Request Hit Ratios. Here, and on subsequent lines, you'll see two hit ratio numbers: one for the last five minutes, and one for the last hour. These values are simply the percentage of HTTP requests that result in a cache hit. Here, hits include cases in which Squid validates a cached response and receives a Not Modified reply.

Byte Hit Ratios. Squid calculates byte hit ratio by comparing the number of bytes received from origin servers or neighbors to the number of bytes sent to clients. When received bytes are less than sent bytes, the byte hit ratio is positive. However, it is possible to see a negative byte hit ratio.

This might occur, for example, if you have a lot of clients that abort their request before receiving the entire response. Request Memory Hit Ratios. These values represent the percentage of all cache hits that were served from memory. Or, more accurately, the percentage of all hits not requests!

Request Disk Hit Ratios. Similarly, these values represent the percentage of "plain" cache hits served from disk. Storage Swap size. The amount of data currently cached on disk. It is always expressed in kilobytes. To compensate for space wasted in partial blocks at the end of files, Squid rounds up file sizes to the nearest filesystem block size. Storage Mem size. The amount of data currently cached in memory.

It is always expressed in kilobytes and is always a multiple of Squid's memory page size: 4 KB. Mean Object Size. Simply the storage swap size divided by the number of cached objects.

Squid uses the configured value for a number of internal estimates. Requests given to unlinkd. Finally, Squid's advanced content routing configuration allows you to build content clusters to route and load balance requests via a variety of web servers.

The Squid project provides a number of resources to assist users design, implement and support Squid installations. Please browse the Documentation and Support sections for more information. Template customisation by Alex Dawson and Adrian Chadd. For more in-depth configuration of Squid, see the References section. Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference, and to re-use as necessary.

Make this copy and protect it from writing using the following commands:. In this example it is set to weezie.



0コメント

  • 1000 / 1000