In this article
Use the following reference tables for descriptions and examples of the functions that you can use with the Cache Pipelines feature. The Pipeline Property Cache Pipelines comprises a field set of Alias and pipeline values. Use this function in the Alias when specifying the Alias value. Safe retrieval functions differ from the others in that safe retrieval returns null instead of an error values are missing or incorrectly entered.
Functions
cache.retrieve
Description | This function returns the first matching object from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns an error. If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: {"id": 2, "name": "Test 2", "num": 20} Expression: Result: null Expression: Result: Expression: {"id": 1, "name": "Test", "num": 10} |
cache.retrieveFirst
Description | This function specifically returns the first matching object from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns an error. If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: {"id": 2, "name": "Test 2", "num": 20} Expression: Result: null Expression: Result: |
cache.retrieveLast
Description | This function specifically returns the last matching object from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns an error. If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: {"id": 3, "name": "Test 3", "num": 20} Expression: Result: null Expression: Result: |
cache.retrieveAll
Description | This function returns all of the matching objects from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns an error. If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: [ {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20}, ] Expression: Result: null Expression: Result: |
cache.safeRetrieve
Description | This function returns the first matching object from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: {"id": 2, "name": "Test 2", "num": 20} Expression: Result: null Expression: Result: null |
cache.safeRetrieveFirst
Description | This function returns the first matching object from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: {"id": 2, "name": "Test 2", "num": 20} Expression: Result: null Expression: Result: null |
cache.safeRetrieveLast
Description | This function returns the last matching object from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: {"id": 3, "name": "Test 3", "num": 20} Expression: Result: null Expression: Result: null |
cache.safeRetrieveAll
Description | This function returns all of the matching objects from the specified cache alias using the filter conditions as provided. The entire document that has been stored and matches the filter criteria is returned. If the cache hasn’t been defined in the Cache Pipelines field set, the function returns If the filter criteria doesn’t match any data, it returns |
---|---|
Syntax |
|
Examples | Data in cache [ {"id": 1, "name": "Test", "num": 10}, {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20} ] Expression: Result: [ {"id": 2, "name": "Test 2", "num": 20}, {"id": 3, "name": "Test 3", "num": 20}, ] Expression: Result: null Expression: Result: null |