Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Cache Related Functions

Various standard functions in the Standard catalog `Cluster.DataGrid` category enable you to work with objects in the cache.

Cache load functions load items into the Rete network so they are available.

Tool tips in the user interface (and reproduced in the TIBCO BusinessEvents Functions Reference) explain the details of how to use the functions. This section explains certain patterns of use.

These core functions are used with both the Oracle and TIBCO cache providers.

Note: The previous versions of these core functions (which began with `C_`) are deprecated. Migrate projects created in earlier releases to use the current names.

Query functions are not available for the Legacy ActiveSpaces provider.

## Functions for Loading Entities to Rete from Cache and Backing Store

    CacheLoadConceptByExtId
    CacheLoadConceptsByExtId
    CacheLoadConceptById
    CacheLoadConceptsById
    CacheLoadEventByExtId
    CacheLoadEventById()
    CacheLoadParent()

`CacheLoad*()` functions are required for working with cache only cache mode. They load entities from the cache (or backing store if not found in the cache) into the Rete network. See Loading Cache Only Objects into the Rete Network in TIBCO BusinessEvents Architect Guide for details.

Use the `CacheLoad*()` functions in an event preprocessor. Only use them in rules for cases where the `ID` or `ExtId` is not known in advance (in the preprocessor).

After cache-only concepts are loaded in this way, you can then use `Instance.getByExtId()` in rules.

Never use `Instance.getByExtId()` unless you have first loaded the concept. `Instance.getByExtId()` does not assert the concept but just returns it for use in rules, for example, as read-only reference data.

Note: When querying by extid, you must use the functions `Cluster.DataGrid.CacheLoadConceptByExtIdByUri` and `Cluster.DataGrid.CacheLoadEventByExtIdByUri`.

## Locking Functions

    Lock()
    UnLock()

In the event preprocessor, use the `Lock()` function to prevent other threads or engines from operating on the same entity. The lock is automatically released at the end of the RTC.

Use `Unlock()` only in a preprocessor and only to handle cases where you need to release the lock immediately instead of at the end of the RTC, for example because some information is missing that would be required to go forward.

See Using Locks to Ensure Data Integrity Within and Across Agents in TIBCO BusinessEvents Architect Guide for details about use of locks.

## Indexing Function

`Index()` creates an index on the specified property, which is useful when you run queries. However, a simpler way is to use Present in Index checkboxes in the CDD.

## Specialty Functions Not for General Use

The following functions are used only in certain applications:

    CacheLoadConceptIndexedByExtId()
    CacheLoadEntity()
    CacheReevaluate()
    EnableCacheUpdate()

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.