| This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
| This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal. |
The Kony middleware includes a caching mechanism to cache the result objects returned from service calls. This improves the turn-around time a great deal for static services and/or very common service calls. Examples of service calls where this can be implemented in real time are airport lists for airlines applications, list of feeds that need to be refreshed at a regular interval, and a list of products that need to be updated for a retail application.
Caching is applied to all users across all sessions in a specific node in a Kony Server cluster. Unlike session information, cached items are not shared among different nodes in a cluster. Inputs to the service call are not considered for cache "matching" purposes, so the only logical place to apply this would be for global data that applies to all users.
There is a difference between session and cache. Session data is available for a particular user whereas cached data is available to all users.
The result objects are cached using the service-id and appID as a key. Do not use the same key unless you specifically want to over-write the value cached by middleware.
The cache is not a replacement for storing values in a session.
Cache should be used only for enhanced performance and temporary storage while the business logic should not depend on values stored in cache.
Below are the steps to be implemented for making the cache functionality work in any server using the Kony Middleware.
The following API’s are used in order to implement this:
To configure the cache, follow the steps detailed below:
ResultCache rcache = ResultCacheImpl.getInstance() ;
rcache.insertIntoCache(Object key,Object value) ;
ResultCache rcache = ResultCacheImpl.getInstance() ;
Result resultObject = (Result) rcache.retrieveFromCache(Object key) ;
Hi
Is this applicable to Kony cloud as well?
Thanks
Thank you @Mallikarjuna anegondi for sharing this helpful information!