Public Member Functions
Tonido::System::LCacheExpireCache< TKey, TValue > Class Template Reference

List of all members.

Public Member Functions

 LCacheExpireCache (Poco::Timestamp::TimeDiff expire=12000000)
const TKey * getKey (const TKey &key)

Detailed Description

template<class TKey, class TValue>
class Tonido::System::LCacheExpireCache< TKey, TValue >

An CacheExpireCache caches entries for a fixed time period (per default 10 minutes) Be careful when using an ExpireCache. A cache is often used like cache.has(x) followed by cache.get x). Note that it could happen that the "has" call works, then the current execution thread gets descheduled, time passes, the entry gets invalid, thus leading to an empty SharedPtr being returned when "get" is invoked.


Generated on Wed Oct 12 2011 21:46:54. © CodeLathe LLC 2007-2011. All Rights Reserved.