| CARVIEW |
Select Language
HTTP/1.1 301 Moved Permanently
Date: Tue, 30 Dec 2025 04:16:41 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Security-Policy: default-src 'self'; font-src *;img-src * data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-ancestors 'none';
Location: https://www.squid-cache.org/Doc/code/
Content-Length: 329
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 302 Found
Date: Tue, 30 Dec 2025 04:16:41 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Security-Policy: default-src 'self'; font-src *;img-src * data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-ancestors 'none';
Location: https://code-reference.squid-cache.org/
Content-Length: 308
Connection: close
Content-Type: text/html; charset=iso-8859-1
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Mon, 29 Dec 2025 03:58:23 GMT
access-control-allow-origin: *
etag: W/"6951fc5f-18e5"
expires: Tue, 30 Dec 2025 04:26:42 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 53C0:3946E9:986CE4:AB5993:69535228
accept-ranges: bytes
age: 0
date: Tue, 30 Dec 2025 04:16:42 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210052-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1767068202.996424,VS0,VE209
vary: Accept-Encoding
x-fastly-request-id: 6a9df850a04eeaaeb37c165fd2c991e383317280
content-length: 2451
Squid Web Cache: Squid Developer Programming Guide
|
Squid Web Cache master
|
Loading...
Searching...
No Matches
Squid Developer Programming Guide
Abstract
- Squid is a WWW Cache application developed by the National Laboratory for Applied Network Research and members of the Web Caching community. Squid is implemented as a single, non-blocking process based around a BSD select() loop. This document describes the operation of the Squid source code and is intended to be used by others who wish to customize or improve it.
Introduction
- The Squid source code has evolved more from empirical observation and tinkering, rather than a solid design process. It carries a legacy of being "touched" by numerous individuals, each with somewhat different techniques and terminology.
- Squid is a single-process proxy server. Every request is handled by the main process, with the exception of FTP. However, Squid does not use a "threads package" such has Pthreads. While this might be easier to code, it suffers from portability and performance problems. Instead Squid maintains data structures and state information for each active request.
- The code is often difficult to follow because there are no explicit state variables for the active requests. Instead, thread execution progresses as a sequence of "callback functions" which get executed when I/O is ready to occur, or some other event has happened. As a callback function completes, it is responsible for registering the next callback function for subsequent I/O.
- Note there is only a pseudo-consistent naming scheme. In most cases functions are named like
moduleFooBar(). However, there are also some functions named likemodule_foo_bar().
- Note that the Squid source changes rapidly, and while we do make some effort to document code as we go some parts of the documentation may be left out. If you find any inconsistencies, please feel free to notify https://www.squid-cache.org/Support/contact.dyn the Squid Developers.