Store.h
Go to the documentation of this file.
57 const HttpReply *hasFreshestReply() const { return mem_obj ? &mem_obj->freshestReply() : nullptr; }
153 void createMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod);
156 void ensureMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod);
409 StoreEntry *storeGetPublicByRequest(HttpRequest * request, const KeyScope keyScope = ksDefault);
412 StoreEntry *storeGetPublicByRequestMethod(HttpRequest * request, const HttpRequestMethod& method, const KeyScope keyScope = ksDefault);
416 StoreEntry *storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod&);
420 StoreEntry *storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod&);
StoreEntry * storeGetPublicByRequest(HttpRequest *request, const KeyScope keyScope=ksDefault)
Definition: store.cc:491
bool updateOnNotModified(const StoreEntry &e304)
Definition: store.cc:1436
void ensureMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod)
initialize mem_obj (if needed) and set URIs/method (if missing)
Definition: store.cc:1567
void unregisterAbortCallback(const char *reason)
Definition: store.cc:1467
Definition: Store.h:351
void checkDisk() const
does nothing except throwing if disk-associated data members are inconsistent
Definition: store.cc:1924
size_t storeEntryInUse()
void setPrivateKey(const bool shareable, const bool permanent)
Definition: store.cc:523
bool setPublicKey(const KeyScope keyScope=ksDefault)
Definition: store.cc:550
Definition: cbdata.cc:60
void storeAppendVPrintf(StoreEntry *, const char *, va_list ap)
Definition: store.cc:840
Definition: Pool.h:179
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1683
void storeSwapFileNumberSet(StoreEntry *e, sfileno filn)
bool mayStartSwapOut()
whether we may start writing to disk (now or in the future)
Definition: store_swapout.cc:336
Definition: Packable.h:53
StoreEntry * storeGetPublicByRequestMethod(HttpRequest *request, const HttpRequestMethod &method, const KeyScope keyScope=ksDefault)
Definition: store.cc:485
Definition: Range.h:19
enum _mem_status_t mem_status_t
Definition: HttpRequest.h:49
Definition: StoreIOBuffer.h:16
bool hasIfNoneMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-None-Match etags
Definition: store.cc:1842
Definition: RequestFlags.h:21
bool hasOneOfEtags(const String &reqETags, const bool allowWeakMatch) const
whether at least one of the request ETags matches entity ETag
Definition: store.cc:1853
bool hasDisk(const sdirno dirn=-1, const sfileno filen=-1) const
Definition: store.cc:1891
void storeAppendPrintf(StoreEntry *, const char *,...) PRINTF_FORMAT_ARG2
Definition: store.cc:830
friend std::ostream & operator<<(std::ostream &os, const StoreEntry &e)
Definition: store.cc:2003
Definition: RemovalPolicy.h:30
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:1975
Definition: RequestMethod.h:27
const char * getSerialisedMetaData(size_t &length) const
Definition: store.cc:1730
bool hasMemStore() const
whether there is a corresponding locked shared memory table entry
Definition: Store.h:211
StoreEntry * storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod &)
Definition: store.cc:716
Definition: SquidString.h:26
FREE destroyStoreEntry
void swapOutDecision(const MemObject::SwapOut::Decision &decision)
Definition: store.cc:1767
AsyncCall::Pointer deferredProducer
producer callback registered with deferProducer
Definition: Store.h:333
void unlockAndReset(const char *resetContext=nullptr)
Definition: Store.h:378
void storeHeapPositionUpdate(StoreEntry *, SwapDir *)
Definition: RefCount.h:27
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:210
void completeSuccessfully(const char *whyWeAreSureWeStoredTheWholeReply)
Definition: store.cc:992
StoreEntry * storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod &)
Definition: store.cc:734
Definition: MemObject.h:33
Definition: HttpReply.h:25
Definition: Store.h:42
StoreEntry * storeGetPublic(const char *uri, const HttpRequestMethod &method)
Definition: store.cc:479
Decision
Decision states for StoreEntry::swapoutPossible() and related code.
Definition: MemObject.h:155
const cache_key * calcPublicKey(const KeyScope keyScope)
Definition: store.cc:627
void storeEntryReplaceObject(StoreEntry *, HttpReply *)
void storeFsDone(void)
bool hasTransients() const
whether there is a corresponding locked transients table entry
Definition: Store.h:209
Store::Disk & disk() const
the disk this entry is [being] cached on; asserts for entries w/o a disk
Definition: store.cc:1882
void attachToDisk(const sdirno, const sfileno, const swap_status_t)
Definition: store.cc:1902
virtual void append(char const *, int)
Appends a c-string to existing packed data.
Definition: store.cc:778
Definition: SquidConfig.h:60
void deferProducer(const AsyncCall::Pointer &producer)
call back producer when more buffer space is available
Definition: store.cc:339
bool hittingRequiresCollapsing() const
whether this entry can feed collapsed requests and only them
Definition: Store.h:214
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
EntryGuard(EntryGuard &&)=delete
void lengthWentBad(const char *reason)
flags [truncated or too big] entry with ENTRY_BAD_LENGTH and releases it
Definition: store.cc:984
void registerAbortCallback(const AsyncCall::Pointer &)
notify the StoreEntry writer of a 3rd-party initiated StoreEntry abort
Definition: store.cc:1459
bool swappingOut() const
whether we are in the process of writing this entry to disk
Definition: Store.h:132
bool swappedOut() const
whether the entire entry is now on disk (possibly marked for deletion)
Definition: Store.h:134
bool modifiedSince(const time_t ims, const int imslen=-1) const
Definition: store.cc:1798
Definition: AsyncCall.h:40
bool hasIfMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-Match etags
Definition: store.cc:1835
bool hasEtag(ETag &etag) const
whether this entry has an ETag; if yes, puts ETag value into parameter
Definition: store.cc:1824
void completeTruncated(const char *whyWeConsiderTheReplyTruncated)
Definition: store.cc:999
void storeErrorResponse(HttpReply *reply)
Store a prepared error response. MemObject locks the reply object.
Definition: store.cc:1666
sfileno swap_filen
unique ID inside a cache_dir for swapped out entries; -1 for others
Definition: Store.h:234