Squid internals The Storage Manager (src/store*.c) Store Clients - typical flow There are two types of store clients Disk clients (STORE_DISK_CLIENT) If the beginning of the object isn't avaliable in memory, the client must be a disk client Memory clients (STORE_MEM_CLIENT) If the beginning of the object is in memory or the object is an internal object, the client must be a mem client StoreClientCopy() will return when data is avaliable, or an error occurs The "magic" inside StoreClientCopy*() chooses whether to read from disk (STORE_DISK_CLIENT) or to wait for data (STORE_MEM_CLIENT)