Channel circle › core 9 Server › cache
cache (core 9, sub 9, flat id 153)
84 functions
| Signature | Purpose | Source | Scope |
|---|---|---|---|
| static int64_t CchNow(void) | Platform seams | CacheChannel.c:54 | static |
| static void CchWipe(void *p, size_t n) | (no comment) | CacheChannel.c:56 | static |
| static int CchNetInit(void) | (no comment) | CacheChannel.c:66 | static |
| static void CchHostMemKb(uint32_t *avail_kb, uint32_t *total_kb) | (no comment) | CacheChannel.c:78 | static |
| static int CchConnect(struct CacheChannel *rc) | (no comment) | CacheChannel.c:107 | static |
| static long CchSend(struct CacheChannel *rc, const uint8_t *p, size_t n) | (no comment) | CacheChannel.c:174 | static |
| static long CchRecv(struct CacheChannel *rc, uint8_t *p, size_t cap) | (no comment) | CacheChannel.c:190 | static |
| static void CchClose(struct CacheChannel *rc) | (no comment) | CacheChannel.c:202 | static |
| static int CchNullConnect(struct CacheChannel *rc) | ---- null seam: canned RESP in, last command captured ---- | CacheChannel.c:218 | static |
| static long CchNullSend(struct CacheChannel *rc, const uint8_t *p, size_t n) | (no comment) | CacheChannel.c:219 | static |
| static long CchNullRecv(struct CacheChannel *rc, uint8_t *p, size_t cap) | (no comment) | CacheChannel.c:227 | static |
| static void CchNullClose(struct CacheChannel *rc) | (no comment) | CacheChannel.c:239 | static |
| const struct cch_net_ops * CacheNullSeam(void) | (no comment) | CacheChannel.c:245 | public |
| void CacheNullSeamLoad(struct CacheChannel *rc, const uint8_t *canned, uint32_t len) | (no comment) | CacheChannel.c:247 | public |
| int CacheOpClass(int op) | (no comment) | CacheChannel.c:300 | public |
| CACHE_INLINE int CchPrefix(const uint8_t *k, uint32_t n, const char *p) | (no comment) | CacheChannel.c:306 | public |
| int CacheKeyClass(const uint8_t *key, uint32_t n) | (no comment) | CacheChannel.c:313 | public |
| int CacheRecSize(uint8_t type) | Records | CacheChannel.c:325 | public |
| CACHE_INLINE int CchUTF8Ok(const uint8_t *s, uint32_t n) | strict UTF-8: no overlongs, no surrogates, <= U+10FFFF | CacheChannel.c:340 | public |
| CACHE_INLINE int CchTextOk(const uint8_t *s, uint32_t n) | text field: valid UTF-8, no control characters (0x00-0x1F, 0x7F) | CacheChannel.c:364 | public |
| int CacheReqCheck(const uint8_t *rec, size_t len) | (no comment) | CacheChannel.c:371 | public |
| 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:394 | public |
| 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:411 | public |
| int CacheResDecode(const uint8_t *rec, size_t len, uint64_t *reqid, int *code, int *retry) | (no comment) | CacheChannel.c:442 | public |
| void CacheQueueReset(struct CacheQueue *q) | Queue | CacheChannel.c:456 | public |
| CACHE_INLINE uint32_t CchQFree(const struct CacheQueue *q) | (no comment) | CacheChannel.c:458 | public |
| CACHE_INLINE int CchQPut(struct CacheQueue *q, const uint8_t *rec, uint32_t n) | (no comment) | CacheChannel.c:463 | public |
| CACHE_HOT long CacheQueueRead(struct CacheQueue *q, void *out, size_t cap) | (no comment) | CacheChannel.c:476 | public |
| CACHE_INLINE void CchEmitRes(struct CacheQueue *q, uint64_t reqid, int code, int retry) | (no comment) | CacheChannel.c:490 | public |
| static void CchEmitValue(struct CacheQueue *q, uint64_t reqid, const uint8_t *v, uint32_t n) | (no comment) | CacheChannel.c:499 | static |
| CACHE_INLINE void CchTxRaw(struct cch_tx *t, const void *s, uint32_t n) | (no comment) | CacheChannel.c:529 | public |
| CACHE_INLINE void CchTxHdr(struct cch_tx *t, uint8_t c, uint32_t v) | (no comment) | CacheChannel.c:536 | public |
| CACHE_INLINE void CchTxArg(struct cch_tx *t, const void *s, uint32_t n) | (no comment) | CacheChannel.c:546 | public |
| CACHE_INLINE void CchTxBegin(struct CacheChannel *rc, struct cch_tx *t, uint32_t argc) | (no comment) | CacheChannel.c:553 | public |
| CACHE_INLINE long CchLine(const uint8_t *b, uint32_t n) | (no comment) | CacheChannel.c:577 | public |
| CACHE_INLINE int CchI64(const uint8_t *p, uint32_t n, int64_t *out) | (no comment) | CacheChannel.c:584 | public |
| static long CchParse(const uint8_t *b, uint32_t n, struct cch_reply *r, int depth) | (no comment) | CacheChannel.c:600 | static |
| int CacheRespProbe(const uint8_t *b, uint32_t n, long *used) | (no comment) | CacheChannel.c:654 | public |
| static void CchDrop(struct CacheChannel *rc, const char *why) | Round trip | CacheChannel.c:665 | static |
| CACHE_INLINE int CchReplyIs(const struct cch_reply *r, int kind, const char *s) | (no comment) | CacheChannel.c:674 | public |
| static int CchErrCode(const struct cch_reply *r) | (no comment) | CacheChannel.c:680 | static |
| static int CchRoundtrip(struct CacheChannel *rc, uint32_t txn, struct cch_reply *r) | (no comment) | CacheChannel.c:692 | static |
| static void CchLoadTarget(struct CacheChannel *rc) | Target and secret (never printed) | CacheChannel.c:718 | static |
| 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:759 | static |
| int CacheConnect(struct CacheChannel *rc) | (no comment) | CacheChannel.c:786 | public |
| CACHE_INLINE int CchEnsure(struct CacheChannel *rc) | (no comment) | CacheChannel.c:842 | public |
| CACHE_INLINE uint64_t CchU64(const uint8_t *p, uint32_t n) | MEM sample (INFO, default sections) | CacheChannel.c:852 | public |
| CACHE_INLINE uint32_t CchSat32(uint64_t v) | (no comment) | CacheChannel.c:863 | public |
| static int CchSample(struct CacheChannel *rc, uint8_t mem[CACHE_MEM_SIZE]) | (no comment) | CacheChannel.c:865 | static |
| 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:975 | public |
| CACHE_INLINE int CchUnhex(const uint8_t *h, uint32_t n, uint8_t *out, uint32_t cap, uint32_t *outn) | (no comment) | CacheChannel.c:989 | public |
| 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:1009 | public |
| CACHE_INLINE void CchDurDel(struct CacheChannel *rc, const uint8_t *k, uint32_t kn) | (no comment) | CacheChannel.c:1017 | public |
| 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 = served | CacheChannel.c:1027 | static |
| static CACHE_HOT int CchExec(struct CacheChannel *rc, const uint8_t *rec, struct CacheQueue *q) | (no comment) | CacheChannel.c:1039 | static |
| CACHE_INLINE void CchLock(struct CacheChannel *rc) | (no comment) | CacheChannel.c:1163 | public |
| CACHE_INLINE void CchUnlock(struct CacheChannel *rc) | (no comment) | CacheChannel.c:1167 | public |
| CACHE_HOT long CacheWriteTo(struct CacheChannel *rc, const void *rec, size_t len, struct CacheQueue *q) | (no comment) | CacheChannel.c:1172 | public |
| CACHE_HOT long CacheWrite(struct CacheChannel *rc, const void *rec, size_t len) | (no comment) | CacheChannel.c:1184 | public |
| CACHE_HOT long CacheRead(struct CacheChannel *rc, void *out, size_t cap) | (no comment) | CacheChannel.c:1190 | public |
| int CacheSample(struct CacheChannel *rc) | (no comment) | CacheChannel.c:1200 | public |
| void CacheSetStaging(struct CacheChannel *rc, int on) | (no comment) | CacheChannel.c:1220 | public |
| int CacheJoin(struct CacheChannel *rc, struct Channel *peer) | Join / Leave | CacheChannel.c:1231 | public |
| int CacheLeave(struct CacheChannel *rc, struct Channel *peer) | (no comment) | CacheChannel.c:1248 | public |
| static void CacheRtRun(struct Channel *ch, long unused) | Runtime adapters (struct Runtime table) | CacheChannel.c:1271 | static |
| static uint64_t CacheRtRead(void *ch, void *out, long cap) | (no comment) | CacheChannel.c:1284 | static |
| static uint64_t CacheRtWrite(void *ch, void *rec, long len) | (no comment) | CacheChannel.c:1286 | static |
| static uint64_t CacheRtJoin(void *peer) | (no comment) | CacheChannel.c:1288 | static |
| static void * CacheRtLeave(void *peer) | (no comment) | CacheChannel.c:1289 | static |
| static void CacheRtOpen(struct Channel *ch) | (no comment) | CacheChannel.c:1290 | static |
| static void CacheRtClose(struct Channel *ch) | (no comment) | CacheChannel.c:1291 | static |
| struct CacheChannel * CacheChannelGet(void) | Open / Close | CacheChannel.c:1296 | public |
| struct CacheChannel * OpenCacheChannel(void) | (no comment) | CacheChannel.c:1298 | public |
| struct CacheChannel * OpenCacheChannelSeam(const struct cch_net_ops *ops) | (no comment) | CacheChannel.c:1300 | public |
| void CloseCacheChannel(struct CacheChannel *rc) | (no comment) | CacheChannel.c:1392 | public |
| 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:1428 | static |
| static uint64_t CchNextReqid(void) | (no comment) | CacheChannel.c:1455 | static |
| int CachePing(struct CacheChannel *rc) | (no comment) | CacheChannel.c:1461 | public |
| int CacheKeySet(struct CacheChannel *rc, const char *key, const uint8_t *val, uint32_t vlen, uint32_t ttl_s) | (no comment) | CacheChannel.c:1468 | public |
| int CacheKeyGet(struct CacheChannel *rc, const char *key, uint8_t *out, uint32_t cap, uint32_t *outlen) | (no comment) | CacheChannel.c:1476 | public |
| int CacheKeyDel(struct CacheChannel *rc, const char *key) | (no comment) | CacheChannel.c:1484 | public |
| int CacheSetDurable(struct CacheChannel *rc, const struct cch_durable_ops *ops, void *ctx) | Durability layer API | CacheChannel.c:1495 | public |
| 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:1509 | static |
| 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:1523 | public |