class

Beryl::TLS::SessionCache

Inherits Reference < Object

A bounded client cache of session tickets, keyed by server name. Each ticket is taken out when it is offered, so it is used once (RFC 9846 §C.4). Safe to share between fibers and threads.

Constructors

new(largest_server_name_count : Int32 = 256, largest_ticket_count_per_name : Int32 = 4)
Source

Instance methods

largest_server_name_count
Source
largest_ticket_count_per_name
Source
size
Source
store(ticket : SessionTicket) : Nil

Stores ticket, dropping the oldest name when the cache is full.

Source
take(server_name : String, now : Time::Instant = Time.instant) : SessionTicket | Nil

Takes the newest usable ticket for server_name, or nil.

Source