28static unsigned int url_checksum(
const char *url);
30url_checksum(
const char *url)
34 static unsigned char digest[16];
38 memcpy(&ck, digest,
sizeof(ck));
49 return Pool().inUseCount();
85 if (!aLogUri || aLogUri == aStoreId)
93 chksum = url_checksum(
urlXXX());
99 debugs(20, 3,
"MemObject constructed, this=" <<
this);
107 debugs(20, 3,
"MemObject destructed, this=" <<
this);
109#if URL_CHECKSUM_DEBUG
138 debugs(19, 6,
"memWrite: offset " << writeBuffer.
offset <<
" len " << writeBuffer.
length);
210 for_each<StoreClientStats>(
clients, statsVisitor);
254 debugs(20, 7,
"unknown; hdr: " << hdr_sz);
258 const auto messageSize = clen + hdr_sz;
259 debugs(20, 7, messageSize <<
" hdr: " << hdr_sz <<
" clen: " << clen);
281 for_each <LowestMemReader>(
clients, lowest);
291 const bool canRead =
endOffset() - savedHttpHeaders <
309#if URL_CHECKSUM_DEBUG
311MemObject::checkUrlChecksum ()
const
365 return lowest_offset;
385 new_mem_lo = on_disk - 1;
387 if (new_mem_lo == -1)
410 debugs (19, result ? 4 :3,
"MemObject::isContiguous: Returning " << (result ?
"true" :
"false"));
418 if (!ignoreDelayPools) {
424 (void)ignoreDelayPools;
450 mostAllowedId.delayRead(aRead);
RemovalPolicy * mem_policy
#define SQUIDSBUFPRINT(s)
int bytesWanted(int min, int max) const
void setNoDelay(bool const)
void schedule()
schedules and forgets all async calls previously stored by delay()
void delay(const AsyncCallPointer &)
stores the given call to schedule it at schedule() or destruction time
int64_t bodySize(const HttpRequestMethod &) const
const SBuf & image() const
int32_t index
entry position inside the memory cache
Store::IoStatus io
current I/O state
int64_t offset
bytes written/read to/from the memory cache so far
int64_t queue_offset
number of bytes sent to SwapDir for writing
StoreIOState::Pointer sio
int32_t index
entry position inside the in-transit table
Store::IoStatus io
current I/O state
void replaceBaseReply(const HttpReplyPointer &r)
int64_t lowestMemReaderOffset() const
DelayId mostBytesAllowed() const
SBuf logUri_
URI used for logging (usually request URI)
IRCB * ping_reply_callback
const char * urlXXX() const
static size_t inUseCount()
int64_t availableForSwapOut() const
buffered bytes we have not swapped out yet
HttpRequestPointer request
int64_t policyLowestOffsetToKeep(bool swap) const
int64_t objectBytesOnDisk() const
void setNoDelay(bool const newValue)
void addClient(store_client *)
XitTable xitTable
current [shared] memory caching state for the entry
int64_t expectedReplySize() const
struct timeval start_ping
void markEndOfReplyHeaders()
sets baseReply().hdr_sz (i.e. written reply headers size) to endOffset()
SBuf storeId_
StoreId for our entry (usually request URI)
void delayRead(const AsyncCallPointer &)
void write(const StoreIOBuffer &buf)
int mostBytesWanted(int max, bool ignoreDelayPools) const
MemCache memCache
current [shared] memory caching state for the entry
int64_t endOffset() const
void setUris(char const *aStoreId, char const *aLogUri, const HttpRequestMethod &aMethod)
const char * storeId() const
const HttpReply & baseReply() const
HttpReply & adjustableBaseReply()
bool hasUris() const
whether setUris() has been called
const char * logUri() const
client request URI used for logging; storeId() by default
DelayedAsyncCalls deferredReads
HttpReplyPointer updatedReply_
bool readAheadPolicyCanRead() const
bool isContiguous() const
void stat(MemBuf *mb) const
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
struct SquidConfig::@90 onoff
struct SquidConfig::@88 Store
int64_t freeDataUpto(int64_t)
bool write(StoreIOBuffer const &)
int64_t endOffset() const
bool hasContigousContentRange(Range< int64_t > const &range) const
auto discardableHttpEnd() const
the client will not use HTTP response bytes with lower offsets (if any)
void dumpStats(MemBuf *output, int clientNumber) const
A const & max(A const &lhs, A const &rhs)
#define debugs(SECTION, LEVEL, CONTENT)
void dlinkAdd(void *data, dlink_node *m, dlink_list *list)
SQUIDCEXTERN void SquidMD5Init(struct SquidMD5Context *context)
SQUIDCEXTERN void SquidMD5Update(struct SquidMD5Context *context, const void *buf, unsigned len)
SQUIDCEXTERN void SquidMD5Final(uint8_t digest[16], struct SquidMD5Context *context)
LowestMemReader(int64_t seed)
void operator()(store_client const &x)
void operator()(store_client const &x)
StoreClientStats(MemBuf *anEntry)