Store.h
Go to the documentation of this file.
53 const HttpReply *hasFreshestReply() const { return mem_obj ? &mem_obj->freshestReply() : nullptr; }
154 void createMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod);
157 void ensureMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod);
407 StoreEntry *storeGetPublicByRequest(HttpRequest * request, const KeyScope keyScope = ksDefault);
410 StoreEntry *storeGetPublicByRequestMethod(HttpRequest * request, const HttpRequestMethod& method, const KeyScope keyScope = ksDefault);
414 StoreEntry *storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod&);
418 StoreEntry *storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod&);
StoreEntry * storeGetPublicByRequest(HttpRequest *request, const KeyScope keyScope=ksDefault)
Definition: store.cc:516
bool updateOnNotModified(const StoreEntry &e304)
Definition: store.cc:1452
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:1589
void unregisterAbortCallback(const char *reason)
Definition: store.cc:1489
Definition: Store.h:349
void checkDisk() const
does nothing except throwing if disk-associated data members are inconsistent
Definition: store.cc:1961
size_t storeEntryInUse()
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:803
void setPrivateKey(const bool shareable, const bool permanent)
Definition: store.cc:548
bool setPublicKey(const KeyScope keyScope=ksDefault)
Definition: store.cc:575
Definition: cbdata.cc:37
void storeAppendVPrintf(StoreEntry *, const char *, va_list ap)
Definition: store.cc:865
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1705
void storeSwapFileNumberSet(StoreEntry *e, sfileno filn)
Definition: Allocator.h:21
bool mayStartSwapOut()
whether we may start writing to disk (now or in the future)
Definition: store_swapout.cc:328
Definition: Packable.h:52
const char * getSerialisedMetaData(size_t &length) const
Definition: store.cc:1750
StoreEntry * storeGetPublicByRequestMethod(HttpRequest *request, const HttpRequestMethod &method, const KeyScope keyScope=ksDefault)
Definition: store.cc:510
Definition: Range.h:18
enum _mem_status_t mem_status_t
Definition: HttpRequest.h:48
Definition: StoreIOBuffer.h:15
bool hasIfNoneMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-None-Match etags
Definition: store.cc:1880
Definition: RequestFlags.h:22
bool hasOneOfEtags(const String &reqETags, const bool allowWeakMatch) const
whether at least one of the request ETags matches entity ETag
Definition: store.cc:1891
bool hasDisk(const sdirno dirn=-1, const sfileno filen=-1) const
Definition: store.cc:1929
void storeAppendPrintf(StoreEntry *, const char *,...) PRINTF_FORMAT_ARG2
Definition: store.cc:855
friend std::ostream & operator<<(std::ostream &os, const StoreEntry &e)
Definition: store.cc:2044
Definition: RemovalPolicy.h:29
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:2012
Definition: RequestMethod.h:26
bool hasMemStore() const
whether there is a corresponding locked shared memory table entry
Definition: Store.h:212
StoreEntry * storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod &)
Definition: store.cc:741
Definition: SquidString.h:25
FREE destroyStoreEntry
void swapOutDecision(const MemObject::SwapOut::Decision &decision)
Definition: store.cc:1800
AsyncCall::Pointer deferredProducer
producer callback registered with deferProducer
Definition: Store.h:331
void unlockAndReset(const char *resetContext=nullptr)
Definition: Store.h:376
void storeHeapPositionUpdate(StoreEntry *, SwapDir *)
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:213
void completeSuccessfully(const char *whyWeAreSureWeStoredTheWholeReply)
Definition: store.cc:1017
StoreEntry * storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod &)
Definition: store.cc:759
Definition: MemObject.h:33
Definition: HttpReply.h:24
Definition: Store.h:37
StoreEntry * storeGetPublic(const char *uri, const HttpRequestMethod &method)
Definition: store.cc:504
Decision
Decision states for StoreEntry::swapoutPossible() and related code.
Definition: MemObject.h:165
const cache_key * calcPublicKey(const KeyScope keyScope)
Definition: store.cc:652
void storeEntryReplaceObject(StoreEntry *, HttpReply *)
void storeFsDone(void)
bool hasTransients() const
whether there is a corresponding locked transients table entry
Definition: Store.h:210
Store::Disk & disk() const
the disk this entry is [being] cached on; asserts for entries w/o a disk
Definition: store.cc:1920
void attachToDisk(const sdirno, const sfileno, const swap_status_t)
Definition: store.cc:1940
Definition: SquidConfig.h:62
void deferProducer(const AsyncCall::Pointer &producer)
call back producer when more buffer space is available
Definition: store.cc:366
bool hittingRequiresCollapsing() const
whether this entry can feed collapsed requests and only them
Definition: Store.h:215
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
bool hasParsedReplyHeader() const
whether this entry has access to [deserialized] [HTTP] response headers
Definition: store.cc:231
void lengthWentBad(const char *reason)
flags [truncated or too big] entry with ENTRY_BAD_LENGTH and releases it
Definition: store.cc:1009
void registerAbortCallback(const AsyncCall::Pointer &)
notify the StoreEntry writer of a 3rd-party initiated StoreEntry abort
Definition: store.cc:1481
bool swappingOut() const
whether we are in the process of writing this entry to disk
Definition: Store.h:133
bool swappedOut() const
whether the entire entry is now on disk (possibly marked for deletion)
Definition: Store.h:135
bool modifiedSince(const time_t ims, const int imslen=-1) const
Definition: store.cc:1836
void storeWriterDone()
called when a store writer ends its work (successfully or not)
Definition: store.cc:1808
Definition: AsyncCall.h:40
bool hasIfMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-Match etags
Definition: store.cc:1873
bool hasEtag(ETag &etag) const
whether this entry has an ETag; if yes, puts ETag value into parameter
Definition: store.cc:1862
void completeTruncated(const char *whyWeConsiderTheReplyTruncated)
Definition: store.cc:1024
void storeErrorResponse(HttpReply *reply)
Store a prepared error response. MemObject locks the reply object.
Definition: store.cc:1688
sfileno swap_filen
unique ID inside a cache_dir for swapped out entries; -1 for others
Definition: Store.h:235
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products