cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
bdr_entry_t Struct Reference

Big Dumb Reply Entry. Holds an atomically swappable cached response blob. More...

#include <big_dumb_reply.h>

Collaboration diagram for bdr_entry_t:

Public Member Functions

 _Atomic (bdr_blob_t *) blob
 Currently published response blob.
 
 _Atomic (struct bdr_entry_t *) next
 Immutable after publication.
 

Public Attributes

uint64_t request_hash
 Key: SipHash(Method + Path)
 
_Atomic uint64_t response_hash
 Hash of the response content (stability check)
 
_Atomic bool is_stable
 True once the response proved stable.
 
_Atomic bool retired
 Unlinked by the janitor; walkers skip it.
 
_Atomic uint64_t hits
 Hit count (approximate, relaxed)
 
_Atomic int64_t created_at
 Creation timestamp (time_t)
 
cwist_bdr_revalidate_fn revalidate
 Optional hit-time refresh hook.
 
void * revalidate_arg
 Opaque argument for the hook.
 
struct bdr_entry_t * retire_next
 Janitor retired-entry list link.
 

Detailed Description

Big Dumb Reply Entry. Holds an atomically swappable cached response blob.

Definition at line 50 of file big_dumb_reply.h.

Member Function Documentation

◆ _Atomic() [1/2]

bdr_entry_t::_Atomic ( bdr_blob_t *  )

Currently published response blob.

◆ _Atomic() [2/2]

bdr_entry_t::_Atomic ( struct bdr_entry_t *  )

Immutable after publication.

Member Data Documentation

◆ created_at

_Atomic int64_t bdr_entry_t::created_at

Creation timestamp (time_t)

Definition at line 60 of file big_dumb_reply.h.

Referenced by cwist_bdr_put(), cwist_bdr_put_fixed(), and cwist_bdr_put_revalidatable().

◆ hits

_Atomic uint64_t bdr_entry_t::hits

Hit count (approximate, relaxed)

Definition at line 59 of file big_dumb_reply.h.

Referenced by cwist_bdr_put(), cwist_bdr_put_fixed(), and cwist_bdr_put_revalidatable().

◆ is_stable

_Atomic bool bdr_entry_t::is_stable

True once the response proved stable.

Definition at line 54 of file big_dumb_reply.h.

Referenced by cwist_bdr_put(), cwist_bdr_put_fixed(), and cwist_bdr_put_revalidatable().

◆ request_hash

uint64_t bdr_entry_t::request_hash

Key: SipHash(Method + Path)

Definition at line 51 of file big_dumb_reply.h.

◆ response_hash

_Atomic uint64_t bdr_entry_t::response_hash

Hash of the response content (stability check)

Definition at line 53 of file big_dumb_reply.h.

Referenced by cwist_bdr_put(), cwist_bdr_put_fixed(), and cwist_bdr_put_revalidatable().

◆ retire_next

struct bdr_entry_t* bdr_entry_t::retire_next

Janitor retired-entry list link.

Definition at line 66 of file big_dumb_reply.h.

Referenced by cwist_bdr_destroy().

◆ retired

_Atomic bool bdr_entry_t::retired

Unlinked by the janitor; walkers skip it.

Definition at line 55 of file big_dumb_reply.h.

◆ revalidate

cwist_bdr_revalidate_fn bdr_entry_t::revalidate

Optional hit-time refresh hook.

Definition at line 62 of file big_dumb_reply.h.

Referenced by cwist_bdr_put_revalidatable().

◆ revalidate_arg

void* bdr_entry_t::revalidate_arg

Opaque argument for the hook.

Definition at line 63 of file big_dumb_reply.h.

Referenced by cwist_bdr_put_revalidatable().


The documentation for this struct was generated from the following file: