/***************************************************************************
* Copyright (C) 2004-2011 by Patrick Audley *
* paudley@blackcat.ca *
* http://patrickaudley.com *
* *
***************************************************************************/
/**
* @file lru_cache.h Template cache with an LRU removal policy
* @author Patrick Audley
* @version 1.4
* @date June 2012
* @par
* This cache is thread safe if compiled with _REENTRANT defined. It
* uses the BOOST scientific computing library to provide the thread safety
* mutexes.
*
* @par
* Thanks to graydon@pobox.com for the size counting functor.
* Thanks to 月迷津渡 gdcex@qq.com for fixes and tweaks.
*
*/
/**
* @mainpage LRU Cache
*
* @section intro_section Introduction
*
* Fast, thread safe C++ template with Least Recently Used (LRU)
* removal semantics. Complete with a comprehensive unit test
* suite. Threading features require the BOOST scientific library to be
* installed.
*
* @section usage_section Usage
*
* An LRU cache is a fixed size cache that discards the oldest (least
* recently accessed) elements after it fills up. It's ideally
* suited to be used in situations where you need to speed up access to
* slower data sources (databases, synthetic structures, etc.). Below is
* a simple example of using it to cache strings using integer keys.
*
* @section also_section See Also
*
* See: LRU Cache
*
* @example lru_example.cpp
*/
#include