Store.h
Go to the documentation of this file.
57 const HttpReply *hasFreshestReply() const { return mem_obj ? &mem_obj->freshestReply() : nullptr; }
155 void createMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod);
158 void ensureMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod);
414StoreEntry *storeGetPublicByRequestMethod(HttpRequest * request, const HttpRequestMethod& method, const KeyScope keyScope = ksDefault);
418StoreEntry *storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod&);
422StoreEntry *storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod&);
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
void storeHeapPositionUpdate(StoreEntry *, SwapDir *)
void storeEntryReplaceObject(StoreEntry *, HttpReply *)
void storeSwapFileNumberSet(StoreEntry *e, sfileno filn)
void storeFsDone(void)
StoreEntry * storeGetPublicByRequestMethod(HttpRequest *request, const HttpRequestMethod &method, const KeyScope keyScope=ksDefault)
Definition: store.cc:496
size_t storeEntryInUse()
StoreEntry * storeGetPublic(const char *uri, const HttpRequestMethod &method)
Definition: store.cc:490
StoreEntry * storeGetPublicByRequest(HttpRequest *request, const KeyScope keyScope=ksDefault)
Definition: store.cc:502
StoreEntry * storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod &)
Definition: store.cc:727
FREE destroyStoreEntry
void storeAppendVPrintf(StoreEntry *, const char *, va_list ap)
Definition: store.cc:851
StoreEntry * storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod &)
Definition: store.cc:745
void storeAppendPrintf(StoreEntry *, const char *,...) PRINTF_FORMAT_ARG2
Definition: store.cc:841
Definition: AsyncCall.h:41
Definition: HttpReply.h:25
Definition: RequestMethod.h:27
Definition: HttpRequest.h:49
Decision
Decision states for StoreEntry::swapoutPossible() and related code.
Definition: MemObject.h:165
Definition: MemObject.h:34
Definition: Allocator.h:22
Definition: Packable.h:53
Definition: Range.h:19
Definition: RemovalPolicy.h:30
Definition: RequestFlags.h:23
Definition: Store.h:42
void completeSuccessfully(const char *whyWeAreSureWeStoredTheWholeReply)
Definition: store.cc:1003
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:212
void unregisterAbortCallback(const char *reason)
Definition: store.cc:1475
const cache_key * calcPublicKey(const KeyScope keyScope)
Definition: store.cc:638
bool swappedOut() const
whether the entire entry is now on disk (possibly marked for deletion)
Definition: Store.h:136
bool hasIfMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-Match etags
Definition: store.cc:1859
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:1999
const char * getSerialisedMetaData(size_t &length) const
Definition: store.cc:1736
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:1575
bool hasIfNoneMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-None-Match etags
Definition: store.cc:1866
void checkDisk() const
does nothing except throwing if disk-associated data members are inconsistent
Definition: store.cc:1948
void completeTruncated(const char *whyWeConsiderTheReplyTruncated)
Definition: store.cc:1010
bool hasMemStore() const
whether there is a corresponding locked shared memory table entry
Definition: Store.h:213
bool hasEtag(ETag &etag) const
whether this entry has an ETag; if yes, puts ETag value into parameter
Definition: store.cc:1848
bool hasDisk(const sdirno dirn=-1, const sfileno filen=-1) const
Definition: store.cc:1915
void swapOutDecision(const MemObject::SwapOut::Decision &decision)
Definition: store.cc:1786
bool swappingOut() const
whether we are in the process of writing this entry to disk
Definition: Store.h:134
void lengthWentBad(const char *reason)
flags [truncated or too big] entry with ENTRY_BAD_LENGTH and releases it
Definition: store.cc:995
bool updateOnNotModified(const StoreEntry &e304)
Definition: store.cc:1438
void registerAbortCallback(const AsyncCall::Pointer &)
notify the StoreEntry writer of a 3rd-party initiated StoreEntry abort
Definition: store.cc:1467
Store::Disk & disk() const
the disk this entry is [being] cached on; asserts for entries w/o a disk
Definition: store.cc:1906
bool mayStartSwapOut()
whether we may start writing to disk (now or in the future)
Definition: store_swapout.cc:329
friend std::ostream & operator<<(std::ostream &os, const StoreEntry &e)
Definition: store.cc:2031
void storeErrorResponse(HttpReply *reply)
Store a prepared error response. MemObject locks the reply object.
Definition: store.cc:1674
sfileno swap_filen
unique ID inside a cache_dir for swapped out entries; -1 for others
Definition: Store.h:236
void storeWriterDone()
called when a store writer ends its work (successfully or not)
Definition: store.cc:1794
void setPrivateKey(const bool shareable, const bool permanent)
Definition: store.cc:534
void attachToDisk(const sdirno, const sfileno, const swap_status_t)
Definition: store.cc:1926
AsyncCall::Pointer deferredProducer
producer callback registered with deferProducer
Definition: Store.h:335
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1691
bool hasOneOfEtags(const String &reqETags, const bool allowWeakMatch) const
whether at least one of the request ETags matches entity ETag
Definition: store.cc:1877
bool modifiedSince(const time_t ims, const int imslen=-1) const
Definition: store.cc:1822
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:789
bool setPublicKey(const KeyScope keyScope=ksDefault)
Definition: store.cc:561
void deferProducer(const AsyncCall::Pointer &producer)
call back producer when more buffer space is available
Definition: store.cc:352
bool hasTransients() const
whether there is a corresponding locked transients table entry
Definition: Store.h:211
bool hittingRequiresCollapsing() const
whether this entry can feed collapsed requests and only them
Definition: Store.h:216
Definition: StoreIOBuffer.h:16
Definition: Store.h:353
EntryGuard(EntryGuard &&)=delete
void unlockAndReset(const char *resetContext=nullptr)
Definition: Store.h:380
Definition: SquidString.h:26
Definition: cbdata.cc:38
enum _mem_status_t mem_status_t
Definition: SquidConfig.h:62