Squid configuration directive cache_mem
Available in: 3.3 3.2 3.1 2.7 3.HEAD 2.HEAD 3.0 2.6
History:
- Changes in 3.1 cache_mem
 - 
Default size increased to 256MB.
 
Configuration Details:
| Option Name: | cache_mem | 
|---|---|
| Replaces: | |
| Requires: | |
| Default Value: | cache_mem 256 MB | 
| Suggested Config: | 
 | 
    
NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. 'cache_mem' specifies the ideal amount of memory to be used for: * In-Transit objects * Hot Objects * Negative-Cached objects Data for these objects are stored in 4 KB blocks. This parameter specifies the ideal upper limit on the total size of 4 KB blocks allocated. In-Transit objects take the highest priority. In-transit objects have priority over the others. When additional space is needed for incoming data, negative-cached and hot objects will be released. In other words, the negative-cached and hot objects will fill up any unused space not needed for in-transit objects. If circumstances require, this limit will be exceeded. Specifically, if your incoming request rate requires more than 'cache_mem' of memory to hold in-transit objects, Squid will exceed this limit to satisfy the new requests. When the load decreases, blocks will be freed until the high-water mark is reached. Thereafter, blocks will be used to store hot objects. If shared memory caching is enabled, Squid does not use the shared cache space for in-transit objects, but they still consume as much local memory as they need. For more details about the shared memory cache, see memory_cache_shared.  | 
    |
Search
Introduction
- About Squid
 - Why Squid?
 - Squid Developers
 - How to Help Out or Donate
 - Getting Squid
 - Squid Source Packages
 - Squid Deployment Case-Studies
 - Squid Software Foundation
 
Documentation
- Configuration:
 - FAQ and Wiki
 - Guide Books:
 - Non-English
 - More...
 
Support
- Security Advisories
 - Bugzilla Database
 - Mailing lists
 - Contacting us
 - Commercial services
 - Project Sponsors
 - Squid-based products
 
Miscellaneous
- Developer Resources
 - Related Writings
 - Related Software:
 - Squid Artwork
 
