boat
C++23 geospatial library
Loading...
Searching...
No Matches
boat::gui::caches::lru Class Reference

Thread-safe; capacity is the entry limit. More...

#include <lru.hpp>

Inheritance diagram for boat::gui::caches::lru:
Collaboration diagram for boat::gui::caches::lru:

Public Member Functions

 lru (size_t capacity)
std::any get (any_hashable const &key) override
 Returns empty on a miss.
void put (any_hashable key, std::any val) override
cache_stats stats () const override
Public Member Functions inherited from boat::gui::caches::cache
virtual ~cache ()=default

Detailed Description

Thread-safe; capacity is the entry limit.

Constructor & Destructor Documentation

◆ lru()

boat::gui::caches::lru::lru ( size_t capacity)
inlineexplicit

Member Function Documentation

◆ get()

std::any boat::gui::caches::lru::get ( any_hashable const & )
inlineoverridevirtual

Returns empty on a miss.

Implements boat::gui::caches::cache.

◆ put()

void boat::gui::caches::lru::put ( any_hashable key,
std::any val )
inlineoverridevirtual

◆ stats()

cache_stats boat::gui::caches::lru::stats ( ) const
inlineoverridevirtual

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