Does someone know of an example for excalibur cache? It is in sandbox without
any references from somewhere.
Sorry, no known examples, but I can answer any questions you may have. Here's some code from a project of mine that is initialization a Cache:
Cache cache = new TimeMapLRUCache( new FlipSpacesStore( m_capacity ) );
if( m_timeout > 0 )
{
final TimeoutValidator validator = new TimeoutValidator( m_timeout );
cache = new ValidatingCache( cache, validator );
cache.addListener( validator );
}m_cache = new SynchronizedCache( cache );
if( getLogger().isDebugEnabled() )
{
m_cache.addListener( new CacheListener()
{
public void added( CacheEvent event )
{
getLogger().debug( "Cached[" + event.getKey() + "] size: " + m_cache.size() );
}
public void removed( CacheEvent event )
{
getLogger().debug( "Removed[" + event.getKey() + "] size: " + m_cache.size() );
}
} );
}
-pete
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
