#include <Store.h>

Inheritance diagram for StoreEntry:
Collaboration diagram for StoreEntry:

Public Member Functions

bool checkDeferRead (int fd) const
const char * getMD5Text () const
 StoreEntry ()
virtual ~StoreEntry ()
HttpReply const * getReply () const
void write (StoreIOBuffer)
bool isEmpty () const
bool isAccepting () const
size_t bytesWanted (Range< size_t > const aRange, bool ignoreDelayPool=false) const
void lengthWentBad (const char *reason)
 flags [truncated or too big] entry with ENTRY_BAD_LENGTH and releases it More...
void complete ()
store_client_t storeClientType () const
char const * getSerialisedMetaData ()
void storeErrorResponse (HttpReply *reply)
 Store a prepared error response. MemObject locks the reply object. More...
void replaceHttpReply (HttpReply *, bool andStartWriting=true)
void startWriting ()
bool mayStartSwapOut ()
 whether we may start writing to disk (now or in the future) More...
void trimMemory (const bool preserveSwappable)
void memOutDecision (const bool willCacheInRam)
void swapOutDecision (const MemObject::SwapOut::Decision &decision)
void abort ()
bool makePublic (const KeyScope keyScope=ksDefault)
void makePrivate (const bool shareable)
void clearPrivate ()
bool setPublicKey (const KeyScope keyScope=ksDefault)
void clearPublicKeyScope ()
const cache_keypublicKey () const
void setPrivateKey (const bool shareable, const bool permanent)
void expireNow ()
void releaseRequest (const bool shareable=false)
void negativeCache ()
bool cacheNegatively ()
void invokeHandlers ()
void cacheInMemory ()
 start or continue storing in memory cache More...
void swapOut ()
bool swappingOut () const
 whether we are in the process of writing this entry to disk More...
bool swappedOut () const
 whether the entire entry is now on disk (possibly marked for deletion) More...
bool swapoutFailed () const
 whether we failed to write this entry to disk More...
void swapOutFileClose (int how)
const char * url () const
bool checkCachable ()
int checkNegativeHit () const
int locked () const
int validToSend () const
bool memoryCachable ()
 checkCachable() and can be cached in memory More...
void createMemObject ()
void createMemObject (const char *storeId, const char *logUri, const HttpRequestMethod &aMethod)
 initialize mem_obj with URIs/method; assert if mem_obj already exists More...
void ensureMemObject (const char *storeId, const char *logUri, const HttpRequestMethod &aMethod)
 initialize mem_obj (if needed) and set URIs/method (if missing) More...
void dump (int debug_lvl) const
void hashDelete ()
void hashInsert (const cache_key *)
void registerAbort (STABH *cb, void *)
void reset ()
void setMemStatus (mem_status_t)
bool timestampsSet ()
void unregisterAbort ()
void destroyMemObject ()
int checkTooSmall ()
void delayAwareRead (const Comm::ConnectionPointer &conn, char *buf, int len, AsyncCall::Pointer callback)
void setNoDelay (bool const)
void lastModified (const time_t when)
time_t lastModified () const
const char * describeTimestamps () const
bool modifiedSince (const time_t ims, const int imslen=-1) const
bool hasIfMatchEtag (const HttpRequest &request) const
 has ETag matching at least one of the If-Match etags More...
bool hasIfNoneMatchEtag (const HttpRequest &request) const
 has ETag matching at least one of the If-None-Match etags More...
bool hasEtag (ETag &etag) const
 whether this entry has an ETag; if yes, puts ETag value into parameter More...
Store::Diskdisk () const
 the disk this entry is [being] cached on; asserts for entries w/o a disk More...
bool hasDisk (const sdirno dirn=-1, const sfileno filen=-1) const
void attachToDisk (const sdirno, const sfileno, const swap_status_t)
void detachFromDisk ()
bool hasTransients () const
 whether there is a corresponding locked transients table entry More...
bool hasMemStore () const
 whether there is a corresponding locked shared memory table entry More...
bool hittingRequiresCollapsing () const
 whether this entry can feed collapsed requests and only them More...
void setCollapsingRequirement (const bool required)
 allow or forbid collapsed requests feeding More...
void * operator new (size_t byteCount)
void operator delete (void *address)
int64_t objectLen () const
int64_t contentLen () const
void lock (const char *context)
int unlock (const char *context)
int locks () const
 returns a local concurrent use counter, for debugging More...
void touch ()
 update last reference timestamp and related Store metadata More...
void release (const bool shareable=false)
void abandon (const char *context)
bool mayStartHitting () const
void deferProducer (const AsyncCall::Pointer &producer)
 call back producer when more buffer space is available More...
void kickProducer ()
 calls back producer registered with deferProducer More...
virtual void append (char const *, int)
 Appends a c-string to existing packed data. More...
virtual void vappendf (const char *, va_list)
virtual void buffer ()
virtual void flush ()
void appendf (const char *fmt,...) PRINTF_FORMAT_ARG2
 Append operation with printf-style arguments. More...

Static Public Member Functions

static size_t inUseCount ()
static void getPublicByRequestMethod (StoreClient *aClient, HttpRequest *request, const HttpRequestMethod &method)
static void getPublicByRequest (StoreClient *aClient, HttpRequest *request)
static void getPublic (StoreClient *aClient, const char *uri, const HttpRequestMethod &method)

Public Attributes

RemovalPolicyNode repl
time_t timestamp
time_t lastref
time_t expires
uint64_t swap_file_sz
uint16_t refcount
uint16_t flags
sfileno swap_filen:25
 unique ID inside a cache_dir for swapped out entries; -1 for others More...
sdirno swap_dirn:7
mem_status_t mem_status:3
ping_status_t ping_status:3
store_status_t store_status:3
swap_status_t swap_status:3
ESIElement::Pointer cachedESITree
void * key

Static Public Attributes

static DeferredRead::DeferrableRead DeferReader

Protected Types

typedef Store::EntryGuard EntryGuard

Protected Member Functions

void transientsAbandonmentCheck ()
void checkDisk () const
 does nothing except throwing if disk-associated data members are inconsistent More...

Private Member Functions

void doAbandon (const char *context)
bool checkTooBig () const
void forcePublicKey (const cache_key *newkey)
StoreEntryadjustVary ()
const cache_keycalcPublicKey (const KeyScope keyScope)
bool validLength () const
bool hasOneOfEtags (const String &reqETags, const bool allowWeakMatch) const
 whether at least one of the request ETags matches entity ETag More...

Private Attributes

time_t lastModified_
 received Last-Modified value or -1; use lastModified() More...
unsigned short lock_count
bool shareableWhenPrivate
AsyncCall::Pointer deferredProducer
 producer callback registered with deferProducer More...

Static Private Attributes

static MemAllocatorpool = NULL


std::ostream & operator<< (std::ostream &os, const StoreEntry &e)

Detailed Description

Definition at line 41 of file Store.h.

Member Typedef Documentation

◆ EntryGuard

Definition at line 287 of file Store.h.

Constructor & Destructor Documentation

◆ StoreEntry()

StoreEntry::StoreEntry ( )

Definition at line 330 of file store.cc.

References debugs.

Referenced by storeCreatePureEntry().

◆ ~StoreEntry()

StoreEntry::~StoreEntry ( )

Definition at line 351 of file store.cc.

References debugs.

Member Function Documentation

◆ abandon()

void StoreEntry::abandon ( const char *  context)

One of the three methods to get rid of an unlocked StoreEntry object. May destroy this object if it is unlocked; does nothing otherwise. Unlike release(), may not trigger eviction of underlying store entries, but, unlike destroyStoreEntry(), does honor an earlier release request.

Definition at line 265 of file Store.h.

References doAbandon(), and locked().

Referenced by unlock().

◆ abort()

◆ adjustVary()

StoreEntry * StoreEntry::adjustVary ( )

Updates mem_obj->request->vary_headers to reflect the current Vary. The vary_headers field is used to calculate the Vary marker key. Releases the old Vary marker with an outdated key (if any).

new (locked) Vary marker StoreEntry or, if none was needed, nil
std::exceptionon failures

Definition at line 689 of file store.cc.

References assert, String::clean(), SBuf::clear(), SBuf::cmp(), complete(), HttpRequest::flags, HttpHeader::getList(), RefCount< C >::getRaw(), MemObject::getReply(), Http::HDR_X_ACCELERATOR_VARY, Http::Message::header, httpMakeVaryMark(), SBuf::isEmpty(), MemObject::logUri(), makePublic(), mem_obj, MemObject::method, HttpRequest::method, HttpHeader::putStr(), replaceHttpReply(), MemObject::request, request(), Http::scOkay, HttpReply::setHeaders(), String::size(), squid_curtime, startWriting(), storeCreateEntry(), storeGetPublic(), MemObject::storeId(), String::termedBuf(), TexcHere, timestampsSet(), unlock(), Http::VARY, HttpRequest::vary_headers, and MemObject::vary_headers.

Referenced by setPublicKey().

◆ append()

◆ appendf()

void Packable::appendf ( const char *  fmt,

Definition at line 61 of file Packable.h.

References Packable::vappendf().

Referenced by Ftp::Server::acceptDataConnection(), aclParseAccessLine(), aclParseAclList(), Format::Format::assemble(), HttpStateData::buildRequestPrefix(), clientPackRangeHdr(), clientPackTermBound(), ErrorState::compileLegacyCode(), ErrorState::Dump(), dump_cachemgrpasswd(), Security::ServerOptions::dumpCfg(), Security::PeerOptions::dumpCfg(), store_client::dumpStats(), Adaptation::Icap::ModXact::encapsulateHead(), errorInitialize(), Adaptation::Icap::Xaction::fillDoneStatus(), Adaptation::Icap::ModXact::fillDoneStatus(), Adaptation::Icap::Xaction::fillPendingStatus(), Adaptation::Icap::ModXact::fillPendingStatus(), HttpStateData::getMoreRequestBody(), gopherSendRequest(), Ftp::Server::handleEpsvReply(), Ftp::Server::handlePasvReply(), helperDispatch(), httpHdrContRangePackInto(), httpHdrRangeRespSpecPackInto(), internalRemoteUri(), Adaptation::Icap::ModXact::makeAllowHeader(), Adaptation::Icap::OptXact::makeRequest(), Adaptation::Icap::ModXact::makeRequestHeaders(), Adaptation::Icap::ModXact::makeUsernameHeader(), memBufReport(), munge_menu_line(), munge_other_line(), Adaptation::Icap::ModXact::openChunk(), HttpRequest::pack(), Http::Stream::packChunk(), HttpRequest::packFirstLineInto(), HttpHdrRangeSpec::packInto(), Http::StatusLine::packInto(), HttpHdrScTarget::packInto(), HttpHdrCc::packInto(), helper::packStatsInto(), Acl::AllOf::parse(), Ftp::PrintReply(), Ftp::Client::sendEprt(), Ftp::Client::sendPassive(), ExternalACLLookup::Start(), Ident::Start(), MemObject::stat(), statStoreEntry(), Ipc::Inquirer::status(), Comm::TcpAcceptor::status(), AsyncJob::status(), Http::Tunneler::status(), Adaptation::Ecap::XactionRep::status(), Security::PeerConnector::status(), Adaptation::Icap::Xaction::status(), BodyPipe::status(), HappyConnOpener::status(), Adaptation::Icap::ServiceRep::status(), wordlistCat(), Ftp::Server::writeCustomReply(), Ftp::Server::writeEarlyReply(), Ftp::Server::writeErrorReply(), and Http::Tunneler::writeRequest().

◆ attachToDisk()

void StoreEntry::attachToDisk ( const sdirno  dirn,
const sfileno  fno,
const swap_status_t  status 

Makes hasDisk(dirn, filn) true. The caller should have locked the corresponding disk store entry for reading or writing.

Definition at line 2014 of file store.cc.

References checkDisk(), debugs, getMD5Text(), swap_dirn, swap_filen, swap_status, and swapStatusStr.

Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), Rock::SwapDir::anchorEntry(), lastModified(), and storeSwapOutStart().

◆ buffer()

◆ bytesWanted()

size_t StoreEntry::bytesWanted ( Range< size_t > const  aRange,
bool  ignoreDelayPool = false 
) const

◆ cacheInMemory()

void StoreEntry::cacheInMemory ( )

Referenced by publicKey().

◆ cacheNegatively()

bool StoreEntry::cacheNegatively ( )

Definition at line 166 of file store.cc.

Referenced by HttpStateData::haveParsedReplyHeaders(), and publicKey().

◆ calcPublicKey()

const cache_key * StoreEntry::calcPublicKey ( const KeyScope  keyScope)

Calculates correct public key for feeding forcePublicKey(). Assumes adjustVary() has been called for this entry already.

Definition at line 676 of file store.cc.

References assert, RefCount< C >::getRaw(), mem_obj, MemObject::method, MemObject::request, MemObject::storeId(), storeKeyPublic(), and storeKeyPublicByRequest().

Referenced by clearPublicKeyScope(), and setPublicKey().

◆ checkCachable()

◆ checkDeferRead()

bool StoreEntry::checkDeferRead ( int  fd) const

Definition at line 247 of file store.cc.

References INT_MAX.

Referenced by statObjects(), and swapOut().

◆ checkDisk()

◆ checkNegativeHit()

int StoreEntry::checkNegativeHit ( ) const

◆ checkTooBig()

bool StoreEntry::checkTooBig ( ) const

◆ checkTooSmall()

int StoreEntry::checkTooSmall ( )

◆ clearPrivate()

void StoreEntry::clearPrivate ( )

A low-level method just resetting "private key" flags. To avoid key inconsistency please use forcePublicKey() or similar instead.

Definition at line 158 of file store.cc.


Referenced by forcePublicKey(), and isEmpty().

◆ clearPublicKeyScope()

void StoreEntry::clearPublicKeyScope ( )

Resets existing public key to a public key with default scope, releasing the old default-scope entry (if any). Does nothing if the existing public key already has default scope.

Definition at line 633 of file store.cc.

References calcPublicKey(), EBIT_TEST, flags, forcePublicKey(), hash_link::key, KEY_PRIVATE, ksDefault, and storeKeyHashCmp.

Referenced by clientReplyContext::handleIMSReply(), and isEmpty().

◆ complete()

◆ contentLen()

int64_t StoreEntry::contentLen ( ) const

Definition at line 1668 of file store.cc.

References assert, getReply(), Http::Message::hdr_sz, mem_obj, NULL, and objectLen().

Referenced by modifiedSince(), and storeLog().

◆ createMemObject() [1/2]

void StoreEntry::createMemObject ( )

initialize mem_obj; assert if mem_obj already exists avoid this method in favor of createMemObject(trio)!

Definition at line 1615 of file store.cc.

References assert, and mem_obj.

Referenced by Rock::SwapDir::get(), MemStore::get(), Transients::get(), storeCreatePureEntry(), swapoutFailed(), testStoreController::testMaxSize(), testStoreHashIndex::testMaxSize(), testStoreController::testStats(), and testStoreHashIndex::testStats().

◆ createMemObject() [2/2]

void StoreEntry::createMemObject ( const char *  storeId,
const char *  logUri,
const HttpRequestMethod aMethod 

Definition at line 1622 of file store.cc.

References assert, ensureMemObject(), and mem_obj.

◆ deferProducer()

void StoreEntry::deferProducer ( const AsyncCall::Pointer producer)

◆ delayAwareRead()

void StoreEntry::delayAwareRead ( const Comm::ConnectionPointer conn,
char *  buf,
int  len,
AsyncCall::Pointer  callback 

◆ describeTimestamps()

const char * StoreEntry::describeTimestamps ( ) const
a formatted string with entry's timestamps

Definition at line 2075 of file store.cc.

References buf, expires, lastModified_, lastref, LOCAL_ARRAY, and timestamp.

Referenced by lastModified(), and statStoreEntry().

◆ destroyMemObject()

◆ detachFromDisk()

void StoreEntry::detachFromDisk ( )

Makes hasDisk() false. The caller should have unlocked the corresponding disk store entry.

Definition at line 2028 of file store.cc.

References swap_dirn, swap_filen, swap_status, and SWAPOUT_NONE.

Referenced by Rock::SwapDir::disconnect(), Fs::Ufs::UFSSwapDir::evictCached(), and lastModified().

◆ disk()

◆ doAbandon()

void StoreEntry::doAbandon ( const char *  context)

keep the unlocked StoreEntry object in the local store_table (if needed) or delete it (otherwise)

Definition at line 480 of file store.cc.

References assert, DBG_IMPORTANT, debugs, EBIT_TEST, flags, Store::Controller::handleIdleEntry(), KEY_PRIVATE, locked(), release(), RELEASE_REQUEST, Store::Root(), STORE_PENDING, store_status, and storePendingNClients().

Referenced by abandon().

◆ dump()

◆ ensureMemObject()

void StoreEntry::ensureMemObject ( const char *  storeId,
const char *  logUri,
const HttpRequestMethod aMethod 

◆ expireNow()

void StoreEntry::expireNow ( )

Definition at line 796 of file store.cc.

References debugs, expires, getMD5Text(), and squid_curtime.

Referenced by publicKey().

◆ flush()

◆ forcePublicKey()

void StoreEntry::forcePublicKey ( const cache_key newkey)

Unconditionally sets public key for this store entry. Releases the old entry with the same public key (if any).

Definition at line 650 of file store.cc.

References assert, clearPrivate(), debugs, hasDisk(), hash_lookup(), hashDelete(), hashInsert(), MemObject::hasUris(), hash_link::key, mem_obj, store_table, storeDirSwapLog(), storeKeyText(), and SWAP_LOG_ADD.

Referenced by clearPublicKeyScope(), and setPublicKey().

◆ getMD5Text()

◆ getPublic()

void StoreEntry::getPublic ( StoreClient aClient,
const char *  uri,
const HttpRequestMethod method 

Definition at line 515 of file store.cc.

References assert, StoreClient::created(), and storeGetPublic().

Referenced by doV2Query(), doV3Query(), MimeIcon::load(), and UrnState::start().

◆ getPublicByRequest()

void StoreEntry::getPublicByRequest ( StoreClient aClient,
HttpRequest request 

◆ getPublicByRequestMethod()

◆ getReply()

◆ getSerialisedMetaData()

char const * StoreEntry::getSerialisedMetaData ( )

◆ hasDisk()

◆ hasEtag()

bool StoreEntry::hasEtag ( ETag etag) const

Definition at line 1936 of file store.cc.

References Http::ETAG, getReply(), and ETag::str.

Referenced by lastModified(), and clientReplyContext::processExpired().

◆ hashDelete()

void StoreEntry::hashDelete ( )

◆ hashInsert()

◆ hasIfMatchEtag()

bool StoreEntry::hasIfMatchEtag ( const HttpRequest request) const

◆ hasIfNoneMatchEtag()

◆ hasMemStore()

◆ hasOneOfEtags()

bool StoreEntry::hasOneOfEtags ( const String reqETags,
const bool  allowWeakMatch 
) const

◆ hasTransients()

◆ hittingRequiresCollapsing()

◆ inUseCount()

size_t StoreEntry::inUseCount ( )

◆ invokeHandlers()

◆ isAccepting()

bool StoreEntry::isAccepting ( ) const

◆ isEmpty()

◆ kickProducer()

void StoreEntry::kickProducer ( )

Definition at line 368 of file store.cc.

References deferredProducer, NULL, and ScheduleCallHere.

Referenced by store_client::copy(), mayStartHitting(), and storeUnregister().

◆ lastModified() [1/2]

◆ lastModified() [2/2]

time_t StoreEntry::lastModified ( ) const
entry's 'effective' modification time

Definition at line 161 of file Store.h.

References attachToDisk(), describeTimestamps(), detachFromDisk(), disk(), hasDisk(), hasEtag(), hasIfMatchEtag(), hasIfNoneMatchEtag(), lastModified_, modifiedSince(), request(), and timestamp.

Referenced by modifiedSince(), and timestampsSet().

◆ lengthWentBad()

void StoreEntry::lengthWentBad ( const char *  reason)

◆ lock()

◆ locked()

◆ locks()

int StoreEntry::locks ( ) const

Definition at line 250 of file Store.h.

References lock_count, release(), and touch().

Referenced by operator<<(), and statStoreEntry().

◆ makePrivate()

void StoreEntry::makePrivate ( const bool  shareable)

◆ makePublic()

◆ mayStartHitting()

bool StoreEntry::mayStartHitting ( ) const

May the caller commit to treating this [previously locked] entry as a cache hit?

Definition at line 269 of file Store.h.

References append(), buffer(), deferProducer(), EBIT_TEST, flush(), KEY_PRIVATE, kickProducer(), shareableWhenPrivate, and vappendf().

Referenced by clientReplyContext::cacheHit(), and clientReplyContext::handleIMSReply().

◆ mayStartSwapOut()

◆ memoryCachable()

◆ memOutDecision()

void StoreEntry::memOutDecision ( const bool  willCacheInRam)

Definition at line 1862 of file store.cc.

References transientsAbandonmentCheck().

Referenced by isEmpty(), MemStore::startCaching(), and MemStore::write().

◆ modifiedSince()

bool StoreEntry::modifiedSince ( const time_t  ims,
const int  imslen = -1 
) const

◆ negativeCache()

void StoreEntry::negativeCache ( )

Set object for negative caching. Preserves any expiry information given by the server. In absence of proper expiry info it will set to expire immediately, or with HTTP-violations enabled the configured negative-TTL is observed

Definition at line 1387 of file store.cc.

References Config, EBIT_SET, ENTRY_NEGCACHED, expires, flags, SquidConfig::negativeTtl, and squid_curtime.

Referenced by abort(), publicKey(), and storeErrorResponse().

◆ objectLen()

◆ operator delete()

void StoreEntry::operator delete ( void *  address)

Definition at line 139 of file store.cc.

◆ operator new()

void * StoreEntry::operator new ( size_t  byteCount)

Definition at line 127 of file store.cc.

References assert, and memPoolCreate.

◆ publicKey()

const cache_key* StoreEntry::publicKey ( ) const

◆ registerAbort()

void StoreEntry::registerAbort ( STABH cb,
void *  data 

◆ release()

void StoreEntry::release ( const bool  shareable = false)

One of the three methods to get rid of an unlocked StoreEntry object. Removes all unlocked (and marks for eventual removal all locked) Store entries, including attached and unattached entries that have our key. Also destroys us if we are unlocked or makes us private otherwise.

Definition at line 1195 of file store.cc.

References debugs, destroyStoreEntry(), Store::Controller::evictCached(), getMD5Text(), hasDisk(), lock(), locked(), PROF_start, PROF_stop, releaseRequest(), Store::Root(), Store::Controller::store_dirs_rebuilding, STORE_LOG_RELEASE, and storeLog().

Referenced by doAbandon(), Store::Controller::handleIdleEntry(), Ftp::Gateway::haveParsedReplyHeaders(), httpMaybeRemovePublic(), locks(), Fs::Ufs::UFSSwapDir::maintain(), clientReplyContext::purgeDoPurgeGet(), clientReplyContext::purgeDoPurgeHead(), Client::setFinalReply(), Store::Controller::syncCollapsed(), and testRock::testRockSwapOut().

◆ releaseRequest()

◆ replaceHttpReply()

◆ reset()

void StoreEntry::reset ( )

◆ setCollapsingRequirement()

void StoreEntry::setCollapsingRequirement ( const bool  required)

◆ setMemStatus()

◆ setNoDelay()

void StoreEntry::setNoDelay ( bool const  newValue)

Definition at line 253 of file store.cc.

Referenced by HttpStateData::HttpStateData(), and swapoutFailed().

◆ setPrivateKey()

void StoreEntry::setPrivateKey ( const bool  shareable,
const bool  permanent 

Either fills this entry with private key or changes the existing key from public to private.

permanentwhether this entry should be private forever.

Definition at line 566 of file store.cc.

References assert, debugs, EBIT_SET, EBIT_TEST, Store::Controller::evictCached(), flags, getKeyCounter(), hash_lookup(), hashDelete(), hashInsert(), MemObject::hasUris(), MemObject::id, hash_link::key, KEY_PRIVATE, mem_obj, NULL, RELEASE_REQUEST, Store::Root(), shareableWhenPrivate, store_table, and storeKeyPrivate().

Referenced by publicKey(), releaseRequest(), and storeCreateEntry().

◆ setPublicKey()

◆ startWriting()

◆ storeClientType()

store_client_t StoreEntry::storeClientType ( ) const

◆ storeErrorResponse()

void StoreEntry::storeErrorResponse ( HttpReply reply)

◆ swapOut()

◆ swapOutDecision()

void StoreEntry::swapOutDecision ( const MemObject::SwapOut::Decision decision)

◆ swapoutFailed()

◆ swapOutFileClose()

void StoreEntry::swapOutFileClose ( int  how)

◆ swappedOut()

bool StoreEntry::swappedOut ( ) const

◆ swappingOut()

bool StoreEntry::swappingOut ( ) const

◆ timestampsSet()

◆ touch()

void StoreEntry::touch ( )

Definition at line 446 of file store.cc.

References lastref, and squid_curtime.

Referenced by locks().

◆ transientsAbandonmentCheck()

void StoreEntry::transientsAbandonmentCheck ( )

Abandon the transient entry our worker has created if neither the shared memory cache nor the disk cache wants to store it. Collapsed requests, if any, should notice and use Plan B instead of getting stuck waiting for us to start swapping the entry out.

Definition at line 1849 of file store.cc.

References debugs, MemObject::SwapOut::decision, hasMemStore(), hasTransients(), mem_obj, Store::Root(), shutting_down, Store::Controller::stopSharing(), MemObject::swapout, and MemObject::SwapOut::swImpossible.

Referenced by memOutDecision(), and swapOutDecision().

◆ trimMemory()

void StoreEntry::trimMemory ( const bool  preserveSwappable)

◆ unlock()

◆ unregisterAbort()

◆ url()

const char * StoreEntry::url ( ) const

Definition at line 1606 of file store.cc.

References mem_obj, NULL, and MemObject::storeId().

Referenced by asHandleReply(), FwdState::complete(), FwdState::connectStart(), HttpStateData::continueAfterParsingHeader(), FwdState::dispatch(), FwdState::fail(), ftpSendReply(), FwdState::FwdState(), Ftp::Gateway::Gateway(), gopherSendComplete(), gopherStart(), gopherTimeout(), gopherToHTML(), Mgr::Forwarder::handleError(), clientReplyContext::handleIMSReply(), HttpStateData::handleMoreRequestBodyAvailable(), FwdState::handleUnregisteredServerEnd(), htcpClear(), htcpClrStoreEntry(), htcpQuery(), HttpStateData::httpBuildRequestHeader(), httpStart(), HttpStateData::httpTimeout(), HttpStateData::keepaliveAccounting(), Ftp::Gateway::listenForDataChannel(), mayStartSwapOut(), modifiedSince(), neighborsUdpPing(), Ftp::Gateway::parseListing(), peerSelect(), peerSelectIcpPing(), clientReplyContext::purgeDoPurgeGet(), clientReplyContext::purgeDoPurgeHead(), WhoisState::readReply(), FwdState::reforward(), replaceHttpReply(), reset(), clientReplyContext::sendMoreData(), FwdState::serverClosed(), UrnState::start(), CacheManager::start(), FwdState::Start(), HttpStateData::statusIfComplete(), storeDigestDel(), storeKeyPublicByRequestMethod(), storeSwapMetaBuild(), storeSwapOutFileClosed(), storeSwapOutStart(), swapOut(), swapoutFailed(), Ftp::Client::timeout(), FwdState::unregister(), PeerSelector::url(), urnHandleReply(), FwdState::useDestinations(), whoisTimeout(), Ftp::Gateway::~Gateway(), and netdbExchangeState::~netdbExchangeState().

◆ validLength()

◆ validToSend()

◆ vappendf()

void StoreEntry::vappendf ( const char *  fmt,
va_list  ap 

Append operation, with vsprintf(3)-style arguments.

arguments may be evaluated more than once, be careful of side-effects

XXX: This method either should not exist or should not be virtual. Kids should not be forced to re-implement vappendf() logic. That logic should be implemented once, using other [Packable] APIs. Packable is not about providing a printf(3) service. Packable is about writing opaque data to various custom destinations.

Implements Packable.

Definition at line 847 of file store.cc.

References append(), assert, buf, fatal(), LOCAL_ARRAY, and xstrerr().

Referenced by mayStartHitting(), storeAppendPrintf(), and storeAppendVPrintf().

◆ write()

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const StoreEntry e 

Definition at line 2115 of file store.cc.

Member Data Documentation

◆ cachedESITree

ESIElement::Pointer StoreEntry::cachedESITree

◆ DeferReader

void StoreEntry::DeferReader

Definition at line 45 of file Store.h.

Referenced by getMD5Text().

◆ deferredProducer

AsyncCall::Pointer StoreEntry::deferredProducer

Definition at line 313 of file Store.h.

Referenced by deferProducer(), and kickProducer().

◆ expires

◆ flags

uint16_t StoreEntry::flags

Definition at line 210 of file Store.h.

Referenced by abort(), Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), Store::Controller::addWriting(), MemStore::anchorEntry(), Rock::SwapDir::anchorEntry(), asHandleReply(), buffer(), clientReplyContext::buildReplyHeader(), clientReplyContext::cacheHit(), Store::Disk::canLog(), Store::Disk::canStore(), checkCachable(), StoreMetaMD5::checkConsistency(), checkDisk(), checkNegativeHit(), CheckQuickAbortIsReasonable(), checkTooSmall(), Store::Controller::checkTransients(), clearPublicKeyScope(), complete(), FwdState::completed(), store_client::copy(), MemStore::copyToShm(), MimeIcon::created(), Ftp::Client::dataRead(), Store::Controller::dereferenceIdle(), FwdState::dispatch(), doAbandon(), dummy_action(), errorAppendEntry(), clientReplyContext::errorInStream(), Store::Disks::evictCached(), Ipc::StoreMapAnchor::exportInto(), flush(), Ftp::Gateway::ftpAcceptDataConnection(), gopherReadReply(), Store::Controller::handleIdleEntry(), clientReplyContext::handleIMSReply(), Http::One::Server::handleReply(), HttpStateData::haveParsedReplyHeaders(), heap_add(), hittingRequiresCollapsing(), httpMaybeRemovePublic(), isAccepting(), lengthWentBad(), locked(), Fs::Ufs::UFSSwapDir::logEntry(), mayStartSwapOut(), negativeCache(), neighborsHtcpReply(), neighborsUdpAck(), netdbExchangeHandleReply(), operator<<(), peerDigestFetchedEnough(), peerDigestRequest(), peerSelectIcpPing(), clientReplyContext::processExpired(), Ftp::Gateway::processHeadResponse(), clientReplyContext::processMiss(), Ftp::Relay::processReplyBody(), HttpStateData::processReplyBody(), Ftp::Gateway::processReplyBody(), publicKey(), clientReplyContext::purgeFoundObject(), Ftp::Client::readControlReply(), HttpStateData::readReply(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Store::Controller::referenceBusy(), FwdState::reforward(), refreshCheck(), releaseRequest(), clientReplyContext::replyStatus(), HttpStateData::reusableReply(), clientReplyContext::sendClientOldEntry(), clientReplyContext::sendClientUpstreamResponse(), Client::sentRequestBody(), Ipc::StoreMapAnchor::set(), setCollapsingRequirement(), Client::setFinalReply(), setMemStatus(), setPrivateKey(), setPublicKey(), MemStore::shouldCache(), statObjects(), storeCleanup(), storeCreatePureEntry(), storeDigestAddable(), storeDigestDel(), storeDigestRewriteResume(), storeDirSwapLog(), storeEntryFlags(), storeRebuildParseEntry(), storeSwapInStart(), swapOut(), Store::Controller::syncCollapsed(), testCacheManager::testRegister(), trimMemory(), urnHandleReply(), validToSend(), write(), and UFSCleanLog::write().

◆ key

void* hash_link::key

Definition at line 19 of file hash.h.

Referenced by accessLogInit(), aclMatchExternal(), MemStore::anchorToCache(), Rock::SwapDir::anchorToCache(), cacheIndexCmp(), StoreMetaMD5::checkConsistency(), clearPublicKeyScope(), client_entry(), clientdbCutoffDenied(), clientdbEstablished(), clientdbGetInfo(), clientdbUpdate(), ClientInfo::ClientInfo(), Rock::SwapDir::createStoreIO(), CommQuotaQueue::dequeue(), destroyStoreEntry(), LeakFinder::dump(), CommQuotaQueue::enqueue(), external_acl_cache_add(), forcePublicKey(), fqdncache_entry::fqdncache_entry(), fqdncacheAddEntry(), fqdncacheParse(), hash_join(), hash_lookup(), hash_remove_link(), hash_unlink(), hashDelete(), hashFreeMemory(), hashInsert(), hashKeyStr(), Rock::SwapDir::hasReadableEntry(), htcpQuery(), IdleConnList::IdleConnList(), idnsCallback(), idnsStartQuery(), ipcache_entry::ipcache_entry(), ipcacheAddEntry(), ipcacheRelease(), LeakFinderPtr::LeakFinderPtr(), Fs::Ufs::UFSSwapDir::logEntry(), Store::Controller::markedForDeletionAndAbandoned(), my_free(), ipcache_entry::name(), neighborsUdpPing(), net_db_name::net_db_name(), netdbHashInsert(), netdbLookupAddr(), PconnPool::noteConnectionRemoved(), Ipc::StoreMap::openForUpdating(), Rock::SwapDir::openStoreIO(), peerCountMcastPeersStart(), publicKey(), read_passwd_file(), Ipc::StoreMapAnchor::set(), setPrivateKey(), setPublicKey(), ClientInfo::setWriteLimiter(), snmp_meshCtblFn(), Ident::Start(), MemStore::startCaching(), storeDigestAdd(), storeDigestDel(), storeKeyPrivate(), storeRebuildParseEntry(), storeSwapMetaBuild(), UFSCleanLog::write(), Rock::IoState::writeToDisk(), ClientInfo::~ClientInfo(), ExternalACLEntry::~ExternalACLEntry(), fqdncache_entry::~fqdncache_entry(), IdleConnList::~IdleConnList(), ipcache_entry::~ipcache_entry(), and net_db_name::~net_db_name().

◆ lastModified_

time_t StoreEntry::lastModified_

Definition at line 206 of file Store.h.

Referenced by describeTimestamps(), dump(), lastModified(), reset(), and timestampsSet().

◆ lastref

◆ lock_count

unsigned short StoreEntry::lock_count

Definition at line 302 of file Store.h.

Referenced by dump(), lock(), locked(), locks(), and unlock().

◆ mem_obj

MemObject* StoreEntry::mem_obj

Definition at line 199 of file Store.h.

Referenced by abort(), Store::Disks::accumulateMore(), Transients::addEntry(), adjustVary(), MemStore::anchorEntry(), append(), CollapsedForwarding::Broadcast(), clientReplyContext::cacheHit(), calcPublicKey(), checkCachable(), StoreMetaVary::checkConsistency(), StoreMetaURL::checkConsistency(), CheckQuickAbortIsReasonable(), checkTooBig(), checkTooSmall(), Transients::clearCollapsingRequirement(), complete(), FwdState::complete(), FwdState::completed(), MemStore::completeWriting(), Transients::completeWriting(), contentLen(), store_client::copy(), MemStore::copyFromShm(), MemStore::copyFromShmSlice(), MemStore::copyToShm(), MemStore::copyToShmSlice(), MimeIcon::created(), createMemObject(), Ftp::Client::dataRead(), Store::Controller::dereferenceIdle(), destroyMemObject(), Rock::SwapDir::disconnect(), MemStore::disconnect(), Transients::disconnect(), store_client::doCopy(), doPages(), dump(), ensureMemObject(), errorAppendEntry(), FwdState::establishTunnelThruProxy(), MemStore::evictCached(), Transients::evictCached(), store_client::fileRead(), findPreviouslyCachedEntry(), forcePublicKey(), Transients::get(), getReply(), getSerialisedMetaData(), gopherReadReply(), Store::Controller::handleIdleEntry(), hasMemStore(), hasTransients(), HttpStateData::haveParsedReplyHeaders(), heap_guessType(), HeapKeyGen_StoreEntry_GDSF(), HeapKeyGen_StoreEntry_LFUDA(), HeapKeyGen_StoreEntry_LRU(), htcpClear(), httpMaybeRemovePublic(), isEmpty(), Transients::isReader(), Transients::isWriter(), Store::Controller::keepForLocalMemoryCache(), mayStartSwapOut(), memoryCachable(), Transients::monitorIo(), store_client::moreToSend(), neighborsHtcpReply(), neighborsUdpAck(), neighborsUdpPing(), objectLen(), objectSizeForDirSelection(), operator<<(), peerCountHandleIcpReply(), peerCountMcastPeersDone(), peerCountMcastPeersStart(), peerDigestFetchReply(), peerDigestFetchSetStats(), HttpStateData::peerSupportsConnectionPinning(), HttpStateData::processReplyHeader(), store_client::readBody(), Transients::readers(), store_client::readHeader(), HttpStateData::readReply(), Store::Controller::referenceBusy(), FwdState::reforward(), refreshCheck(), refreshCheckDigest(), refreshIsCachable(), registerAbort(), repl_guessType(), replaceHttpReply(), reset(), store_client::scheduleMemRead(), store_client::scheduleRead(), setMemStatus(), LruPolicyData::setPolicyNode(), HeapPolicyData::setPolicyNode(), setPrivateKey(), setPublicKey(), MemStore::shouldCache(), FwdState::Start(), MemStore::startCaching(), Rock::HeaderUpdater::startWriting(), startWriting(), statObjectsOpenfdFilter(), statObjectsVmFilter(), statStoreEntry(), Transients::status(), storeClientCopyPending(), storeClientListAdd(), storeDigestRewriteFinish(), storeDigestRewriteStart(), storeLog(), clientReplyContext::storeNotOKTransferDone(), storePendingNClients(), storeSwapInStart(), storeSwapMetaBuild(), storeSwapOutFileClosed(), storeSwapOutStart(), storeUnregister(), swapOut(), swapOutDecision(), swapOutFileClose(), Store::Controller::syncCollapsed(), testRock::testRockSwapOut(), timestampsSet(), transientsAbandonmentCheck(), trimMemory(), store_client::unpackHeader(), unregisterAbort(), MemStore::updateAnchored(), MemStore::updateHeaders(), url(), validLength(), validToSend(), varyEvaluateMatch(), MemStore::write(), write(), and HttpStateData::wroteLast().

◆ mem_status

◆ next

◆ ping_status

◆ pool

MemAllocator * StoreEntry::pool = NULL

Definition at line 300 of file Store.h.

◆ refcount

◆ repl

◆ shareableWhenPrivate

bool StoreEntry::shareableWhenPrivate

Nobody can find/lock KEY_PRIVATE entries, but some transactions (e.g., collapsed requests) find/lock a public entry before it becomes private. May such transactions start using the now-private entry they previously locked? This member should not affect transactions that already started reading from the entry.

Definition at line 309 of file Store.h.

Referenced by mayStartHitting(), operator<<(), releaseRequest(), and setPrivateKey().

◆ store_status

◆ swap_dirn

◆ swap_file_sz

◆ swap_filen

◆ swap_status

◆ timestamp

The documentation for this class was generated from the following files:






Web Site Translations