UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros
lru_cache.h File Reference
#include <stdio.h>
#include <map>
#include <list>
#include <vector>
#include <cstddef>

Go to the source code of this file.

Classes

struct  Countfn< T >
 
class  LRUCache< Key, Data, Sizefn >
 Template cache with an LRU removal policy. More...
 

Macros

#define SCOPED_MUTEX
 If we aren't reentrant then don't do anything.
 

Detailed Description

Template cache with an LRU removal policy

Author
Patrick Audley
Version
1.4
Date
June 2012
This cache is thread safe if compiled with _REENTRANT defined. It uses the BOOST scientific computing library to provide the thread safety mutexes.
Thanks to grayd.nosp@m.on@p.nosp@m.obox..nosp@m.com for the size counting functor. Thanks to 月迷津渡 gdcex.nosp@m.@qq..nosp@m.com for fixes and tweaks.