| |
|
| java.lang.Object pnuts.lib.ResourceCache
ResourceCache | class ResourceCache (Code) | | Resource cache implemented with LRU cache
|
ResourceCache | public ResourceCache()(Code) | | Constructor
|
createResource | protected Object createResource(Object key)(Code) | | Creates a new resource associated with the specified key.
Parameters: key - the key of the resource a newly created resource |
findResource | protected Object findResource(Object key)(Code) | | Finds a resource associated with the specified key.
Returns null if not found or already expired.
Parameters: key - the key of the resource the resource or null |
getResource | public Object getResource(Object key)(Code) | | Gets a resource associated with the specified key.
If the resource has been expired, a new one is created.
Parameters: key - the key of the resource a resource associated with the key |
reset | public void reset()(Code) | | Discard all cached resources
|
|
|
|