|
cwist
Modern C web framework with libttak runtime
|
Big Dumb Reply Context. Lock-free read/learn paths; the mutex only serializes janitor work (sweep/trim/disk spill) and the disk-fallback path. More...
#include <big_dumb_reply.h>

Public Member Functions | |
| _Atomic (bdr_entry_t *) *buckets | |
| Hash buckets. | |
Public Attributes | |
| pthread_mutex_t | lock |
| Serializes janitor and disk-mode operations. | |
| size_t | bucket_count |
| Number of buckets. | |
| int | hit_threshold |
| Learning configuration parameters. | |
| int | latency_threshold_ms |
| Latency threshold to trigger caching. | |
| _Atomic size_t | current_bytes |
| Total bytes stored in-memory. | |
| size_t | max_bytes |
| Soft limit for cached response bytes. | |
| time_t | max_entry_age_sec |
| TTL for cached replies (0 = no TTL) | |
| uint64_t | revalidate_hits |
| Force refresh after this many hits. | |
| size_t | gc_cursor |
| Round-robin sweep cursor. | |
| _Atomic uint64_t | put_count |
| Learn-path calls; drives janitor cadence. | |
| bdr_entry_t * | retired_entries |
| Tombstoned entries, freed at destroy. | |
| struct sqlite3 * | disk_db |
| Fallback disk database mode. | |
| _Atomic bool | is_disk_mode |
| True if fallback is active. | |
Big Dumb Reply Context. Lock-free read/learn paths; the mutex only serializes janitor work (sweep/trim/disk spill) and the disk-fallback path.
Definition at line 96 of file big_dumb_reply.h.
| cwist_bdr_t::_Atomic | ( | bdr_entry_t * | ) |
Hash buckets.
| size_t cwist_bdr_t::bucket_count |
Number of buckets.
Definition at line 99 of file big_dumb_reply.h.
Total bytes stored in-memory.
Definition at line 105 of file big_dumb_reply.h.
Fallback disk database mode.
Disk DB handle for low-RAM mode
Definition at line 115 of file big_dumb_reply.h.
| size_t cwist_bdr_t::gc_cursor |
Round-robin sweep cursor.
Definition at line 109 of file big_dumb_reply.h.
| int cwist_bdr_t::hit_threshold |
Learning configuration parameters.
(Unused) Hits before caching
Definition at line 102 of file big_dumb_reply.h.
True if fallback is active.
Definition at line 116 of file big_dumb_reply.h.
| int cwist_bdr_t::latency_threshold_ms |
Latency threshold to trigger caching.
Definition at line 103 of file big_dumb_reply.h.
| pthread_mutex_t cwist_bdr_t::lock |
Serializes janitor and disk-mode operations.
Definition at line 97 of file big_dumb_reply.h.
| size_t cwist_bdr_t::max_bytes |
Soft limit for cached response bytes.
Definition at line 106 of file big_dumb_reply.h.
| time_t cwist_bdr_t::max_entry_age_sec |
TTL for cached replies (0 = no TTL)
Definition at line 107 of file big_dumb_reply.h.
Learn-path calls; drives janitor cadence.
Definition at line 111 of file big_dumb_reply.h.
| bdr_entry_t* cwist_bdr_t::retired_entries |
Tombstoned entries, freed at destroy.
Definition at line 112 of file big_dumb_reply.h.
| uint64_t cwist_bdr_t::revalidate_hits |
Force refresh after this many hits.
Definition at line 108 of file big_dumb_reply.h.