@get


Description:

public IOStream @get (string path, string key) throws Error

Lookup an item in the cache.

If the item exists, a IOStream is returned for the item. The stream may be shared by multiple callers, so ensure the stream is in a valid state through external locking.

The returned IOStream is referenced for thread-safety and must be unreferenced with unref when finished with it.

Parameters:

this

A DataCache

path

Path to the (sub) cache the item exists in.

key

Key for the cache item.

Returns:

a IOStream for the requested cache item, or null on error