add


Description:

public IOStream add (string path, string key) throws Error

Add a new item to the cache, returning a IOStream to the new item.

The key and the path combine to form a unique key used to store the item.

Potentially, expiry processing will be performed while this call is executing.

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

Parameters:

this

A DataCache

path

Relative path of item to add.

key

Key of item to add.

Returns:

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