IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXGetCacheEntry, DXGetCacheEntryV

Function

Retrieve a cache entry.

Syntax

#include <dx/dx.h>

Object DXGetCacheEntry(char *function, int key, int n, ...)
Object DXGetCacheEntryV(char *function, int key, int n, Object *in)

Functional Details

Both routines return the Object referenced by a cache entry. The cache is indexed by a key created from function, key, n, and the Objects in the Array in. These must be the same values as those used when the Object was placed in the cache with DXSetCacheEntry.

Notes:

  1. Because Data Explorer modules follow pure function semantics, the cache should not be used to store a state that affects the output of the module. A module must always be able to recreate the Object from the same set of inputs; the cache should only be used as an optimization tool.

  2. On a multiprocessor machine, processor local information should not be stored in the cache, since its contents may be retrieved on another processor.

  3. The cache is local to one machine and cannot be used to communicate information between modules on different machines when running in distributed mode.
Since DXGetCacheEntry returns an Object that is referenced so that it will not be deleted, you must delete it when you are finished with it. Failure to do so will result in a memory leak.

For additional details on the deletion of cached Objects, see DXSetCacheEntry.

Return Value

Returns the cached output Object or returns NULL but does not set an error code if no such cache entry exists.

See Also

DXDelete, DXReference, DXSetCacheEntry, DXSetCacheEntryV, DXGetObjectTag, DXSetObjectTag

13.5 , "Cache".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]


[IBM Home Page | Order | Search | Contact IBM | Legal ]