JDECACHE Management APIs

You can manage cache using the JDECACHE management APIs for these purposes:

  • Setting up the cache.

  • Clearing the cache.

  • Terminating the cache.

Use the jdeCacheGetNumRecords and jdeCacheGetNumCursors APIs to retrieve cache statistics. They are only passed the HCACHE handle. All other JDECACHE management APIs should always be passed these handles:

  • HUSER

  • HCACHE

These two handles are essential for cache identification and cache management.

The set of JDECACHE management APIs consist of these APIs:

  • jdeCacheInit

  • jdeCacheInitEx

  • jdeCacheInitMultipleIndex

  • jdeCacheInitMultipleIndexEx

  • jdeCacheInitUser

  • jdeCacheInitMultipleIndexUser

  • jdeCacheGetNumRecords

  • jdeCacheGetNumCursors

  • jdeCacheClear

  • jdeCacheTerminate

  • jdeCacheTerminateAll

The jdeCacheInit and jdeCacheInitMultipleIndex APIs initialize the cache uniquely per user. Therefore, if a user logs in to the software and then runs two sessions of the same application simultaneously, the two application sessions will share the same cache. Consequently, if the first application deletes a record from the cache, the second application cannot access the record. Conversely, if two users log in to the software and then run the same application simultaneously, the two application sessions have different caches. Consequently, if the first application deletes a record from its cache, the second application will still be able to access the record in its own cache. The jdeCacheInitEx and jdeCacheInitMultipleIndexEx APIs function exactly the same, but they additionally enable you to define the maximum number of cursors that can be opened by the cache.

The jdeCacheInitUser and jdeCacheInitMultipleIndexUser APIs initialize the cache uniquely per application. Therefore, if a user logs in to the software and then runs two sessions of the same application simultaneously, the two application sessions will have different caches. Consequently, if the first application deletes a record from its cache, the second application can still access the record in its own cache.