class Kemal::LRUCache(K, V)

Overview

Small, private LRU cache used by the router to avoid full cache clears when many distinct paths are accessed. Keeps get/put at O(1). This is intentionally minimal and file-local to avoid API surface.

Defined in:

kemal/route_handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(capacity : Int32) #

[View source]

Instance Method Detail

def get(key : K) : V | Nil #

[View source]
def put(key : K, value : V) : Nil #

[View source]
def size : Int32 #

[View source]