MultiverseSocial.com

Channel circle › core 9 Server › cache

cache (core 9, sub 9, flat id 153)

84 functions
SignaturePurposeSourceScope
static int64_t CchNow(void)Platform seamsCacheChannel.c:54static
static void CchWipe(void *p, size_t n)(no comment)CacheChannel.c:56static
static int CchNetInit(void)(no comment)CacheChannel.c:66static
static void CchHostMemKb(uint32_t *avail_kb, uint32_t *total_kb)(no comment)CacheChannel.c:78static
static int CchConnect(struct CacheChannel *rc)(no comment)CacheChannel.c:107static
static long CchSend(struct CacheChannel *rc, const uint8_t *p, size_t n)(no comment)CacheChannel.c:174static
static long CchRecv(struct CacheChannel *rc, uint8_t *p, size_t cap)(no comment)CacheChannel.c:190static
static void CchClose(struct CacheChannel *rc)(no comment)CacheChannel.c:202static
static int CchNullConnect(struct CacheChannel *rc)---- null seam: canned RESP in, last command captured ----CacheChannel.c:218static
static long CchNullSend(struct CacheChannel *rc, const uint8_t *p, size_t n)(no comment)CacheChannel.c:219static
static long CchNullRecv(struct CacheChannel *rc, uint8_t *p, size_t cap)(no comment)CacheChannel.c:227static
static void CchNullClose(struct CacheChannel *rc)(no comment)CacheChannel.c:239static
const struct cch_net_ops * CacheNullSeam(void)(no comment)CacheChannel.c:245public
void CacheNullSeamLoad(struct CacheChannel *rc, const uint8_t *canned, uint32_t len)(no comment)CacheChannel.c:247public
int CacheOpClass(int op)(no comment)CacheChannel.c:300public
CACHE_INLINE int CchPrefix(const uint8_t *k, uint32_t n, const char *p)(no comment)CacheChannel.c:306public
int CacheKeyClass(const uint8_t *key, uint32_t n)(no comment)CacheChannel.c:313public
int CacheRecSize(uint8_t type)RecordsCacheChannel.c:325public
CACHE_INLINE int CchUTF8Ok(const uint8_t *s, uint32_t n)strict UTF-8: no overlongs, no surrogates, <= U+10FFFFCacheChannel.c:340public
CACHE_INLINE int CchTextOk(const uint8_t *s, uint32_t n)text field: valid UTF-8, no control characters (0x00-0x1F, 0x7F)CacheChannel.c:364public
int CacheReqCheck(const uint8_t *rec, size_t len)(no comment)CacheChannel.c:371public
int CacheReqBuild(uint8_t out[CACHE_REQ_SIZE], uint64_t reqid, uint8_t op, uint8_t flags, const uint8_t *args, uint32_t argn)(no comment)CacheChannel.c:394public
int CacheReqBuildKV(uint8_t out[CACHE_REQ_SIZE], uint64_t reqid, uint8_t op, uint8_t flags, const char *key, const uint8_t *val, uint32_t vlen, uint32_t ttl_s)(no comment)CacheChannel.c:411public
int CacheResDecode(const uint8_t *rec, size_t len, uint64_t *reqid, int *code, int *retry)(no comment)CacheChannel.c:442public
void CacheQueueReset(struct CacheQueue *q)QueueCacheChannel.c:456public
CACHE_INLINE uint32_t CchQFree(const struct CacheQueue *q)(no comment)CacheChannel.c:458public
CACHE_INLINE int CchQPut(struct CacheQueue *q, const uint8_t *rec, uint32_t n)(no comment)CacheChannel.c:463public
CACHE_HOT long CacheQueueRead(struct CacheQueue *q, void *out, size_t cap)(no comment)CacheChannel.c:476public
CACHE_INLINE void CchEmitRes(struct CacheQueue *q, uint64_t reqid, int code, int retry)(no comment)CacheChannel.c:490public
static void CchEmitValue(struct CacheQueue *q, uint64_t reqid, const uint8_t *v, uint32_t n)(no comment)CacheChannel.c:499static
CACHE_INLINE void CchTxRaw(struct cch_tx *t, const void *s, uint32_t n)(no comment)CacheChannel.c:529public
CACHE_INLINE void CchTxHdr(struct cch_tx *t, uint8_t c, uint32_t v)(no comment)CacheChannel.c:536public
CACHE_INLINE void CchTxArg(struct cch_tx *t, const void *s, uint32_t n)(no comment)CacheChannel.c:546public
CACHE_INLINE void CchTxBegin(struct CacheChannel *rc, struct cch_tx *t, uint32_t argc)(no comment)CacheChannel.c:553public
CACHE_INLINE long CchLine(const uint8_t *b, uint32_t n)(no comment)CacheChannel.c:577public
CACHE_INLINE int CchI64(const uint8_t *p, uint32_t n, int64_t *out)(no comment)CacheChannel.c:584public
static long CchParse(const uint8_t *b, uint32_t n, struct cch_reply *r, int depth)(no comment)CacheChannel.c:600static
int CacheRespProbe(const uint8_t *b, uint32_t n, long *used)(no comment)CacheChannel.c:654public
static void CchDrop(struct CacheChannel *rc, const char *why)Round tripCacheChannel.c:665static
CACHE_INLINE int CchReplyIs(const struct cch_reply *r, int kind, const char *s)(no comment)CacheChannel.c:674public
static int CchErrCode(const struct cch_reply *r)(no comment)CacheChannel.c:680static
static int CchRoundtrip(struct CacheChannel *rc, uint32_t txn, struct cch_reply *r)(no comment)CacheChannel.c:692static
static void CchLoadTarget(struct CacheChannel *rc)Target and secret (never printed)CacheChannel.c:718static
static uint32_t CchLoadSecret(char *out, uint32_t cap)Reads the secret into out (stack buffer of the caller). Returns its length, 0 = none.CacheChannel.c:759static
int CacheConnect(struct CacheChannel *rc)(no comment)CacheChannel.c:786public
CACHE_INLINE int CchEnsure(struct CacheChannel *rc)(no comment)CacheChannel.c:842public
CACHE_INLINE uint64_t CchU64(const uint8_t *p, uint32_t n)MEM sample (INFO, default sections)CacheChannel.c:852public
CACHE_INLINE uint32_t CchSat32(uint64_t v)(no comment)CacheChannel.c:863public
static int CchSample(struct CacheChannel *rc, uint8_t mem[CACHE_MEM_SIZE])(no comment)CacheChannel.c:865static
CACHE_INLINE uint32_t CchSplit(const uint8_t *a, uint32_t n, const uint8_t **f, uint32_t *fl, uint32_t max)Exec: one REQ in, rows + one RES out (into q). Caller holds the lock.CacheChannel.c:975public
CACHE_INLINE int CchUnhex(const uint8_t *h, uint32_t n, uint8_t *out, uint32_t cap, uint32_t *outn)(no comment)CacheChannel.c:989public
CACHE_INLINE void CchDurPut(struct CacheChannel *rc, const uint8_t *k, uint32_t kn, const uint8_t *v, uint32_t vn, int64_t ttl)Durability layer (struct cch_durable_ops): mirror of successful scratch writes. A durable failure never changes the server answer; it is counted in durable_fail.CacheChannel.c:1009public
CACHE_INLINE void CchDurDel(struct CacheChannel *rc, const uint8_t *k, uint32_t kn)(no comment)CacheChannel.c:1017public
static int CchDurGet(struct CacheChannel *rc, const uint8_t *k, uint32_t kn, struct CacheQueue *q, uint64_t reqid)KEYGET while the server is DOWN: answer from the durable copy. 1 = servedCacheChannel.c:1027static
static CACHE_HOT int CchExec(struct CacheChannel *rc, const uint8_t *rec, struct CacheQueue *q)(no comment)CacheChannel.c:1039static
CACHE_INLINE void CchLock(struct CacheChannel *rc)(no comment)CacheChannel.c:1163public
CACHE_INLINE void CchUnlock(struct CacheChannel *rc)(no comment)CacheChannel.c:1167public
CACHE_HOT long CacheWriteTo(struct CacheChannel *rc, const void *rec, size_t len, struct CacheQueue *q)(no comment)CacheChannel.c:1172public
CACHE_HOT long CacheWrite(struct CacheChannel *rc, const void *rec, size_t len)(no comment)CacheChannel.c:1184public
CACHE_HOT long CacheRead(struct CacheChannel *rc, void *out, size_t cap)(no comment)CacheChannel.c:1190public
int CacheSample(struct CacheChannel *rc)(no comment)CacheChannel.c:1200public
void CacheSetStaging(struct CacheChannel *rc, int on)(no comment)CacheChannel.c:1220public
int CacheJoin(struct CacheChannel *rc, struct Channel *peer)Join / LeaveCacheChannel.c:1231public
int CacheLeave(struct CacheChannel *rc, struct Channel *peer)(no comment)CacheChannel.c:1248public
static void CacheRtRun(struct Channel *ch, long unused)Runtime adapters (struct Runtime table)CacheChannel.c:1271static
static uint64_t CacheRtRead(void *ch, void *out, long cap)(no comment)CacheChannel.c:1284static
static uint64_t CacheRtWrite(void *ch, void *rec, long len)(no comment)CacheChannel.c:1286static
static uint64_t CacheRtJoin(void *peer)(no comment)CacheChannel.c:1288static
static void * CacheRtLeave(void *peer)(no comment)CacheChannel.c:1289static
static void CacheRtOpen(struct Channel *ch)(no comment)CacheChannel.c:1290static
static void CacheRtClose(struct Channel *ch)(no comment)CacheChannel.c:1291static
struct CacheChannel * CacheChannelGet(void)Open / CloseCacheChannel.c:1296public
struct CacheChannel * OpenCacheChannel(void)(no comment)CacheChannel.c:1298public
struct CacheChannel * OpenCacheChannelSeam(const struct cch_net_ops *ops)(no comment)CacheChannel.c:1300public
void CloseCacheChannel(struct CacheChannel *rc)(no comment)CacheChannel.c:1392public
static int CchCall(struct CacheChannel *rc, const uint8_t *req, uint8_t *val, uint32_t cap, uint32_t *vlen)Typed helpers (private queue; answer copied out)CacheChannel.c:1428static
static uint64_t CchNextReqid(void)(no comment)CacheChannel.c:1455static
int CachePing(struct CacheChannel *rc)(no comment)CacheChannel.c:1461public
int CacheKeySet(struct CacheChannel *rc, const char *key, const uint8_t *val, uint32_t vlen, uint32_t ttl_s)(no comment)CacheChannel.c:1468public
int CacheKeyGet(struct CacheChannel *rc, const char *key, uint8_t *out, uint32_t cap, uint32_t *outlen)(no comment)CacheChannel.c:1476public
int CacheKeyDel(struct CacheChannel *rc, const char *key)(no comment)CacheChannel.c:1484public
int CacheSetDurable(struct CacheChannel *rc, const struct cch_durable_ops *ops, void *ctx)Durability layer APICacheChannel.c:1495public
static int CchReplayOne(void *arg, const uint8_t *key, uint32_t klen, const uint8_t *val, uint32_t vlen, uint32_t ttl_left_s)(no comment)CacheChannel.c:1509static
int CacheDurableReplay(struct CacheChannel *rc, uint32_t *restored, uint32_t *failed)Push every durable key back into the server. Keys that do not fit one REQ come back as failed.CacheChannel.c:1523public

Core-level functions of core 9 · Core 9 in the full manual

The > Web 4 < Channel Paradigm · full manual · privacy · contact

Hits--