----- Original Message -----
From: "Thorsten Mauch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 7:53 AM
Subject: Cache Doc


> Hi All
> I just found the excalibut cache compoment. Is there a place where
> I can find more docs about it. Or maybe a sample how to use it.

Yep. cache package has just api doc and simple uml diagram.
Here is simple usage.

m_cache = new LRUCache( 10 );

public Object access(String key) {
    Object value = m_cache.get(key);
    if ( null == value ) {
        value = directAccess(key); //retrieve value from primary storage
        if ( null != value ) {
            m_cache.put( key, value );
        }
    }
    return value;
}

public void update(String key, Object value) {
    ...
    update primary storage
    ...
    m_cache.remove(key);
}


>
> Thanx Thorsten
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to