Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Voting: 
Vote up!
0 Votes
3 Replies

Cache monitoring

Pankaj Gautam on Mar 17, 2017 05:18 EDT

Posted In
Vote up!
0 votes
Vote down!

Hello Pankaj,

 

I am presumming that you are reffering to the service cache option present for the integration services. 

In the case of connectors such as XML,JSON,SOAP you just need to enable the cache option under advanced tab for each operation. Once you select this option you can enter the duration(in secs) till which the response should be cached.

Mobile Fabric will ensure to cache the response till the time period specified and sends the same cached response to all the requests. once when the time period exceeds a call will be made to the backend to get the new data. 

 

In the case of java service,  it is up to the developer to implement the java code. Based on your business logic you can cache the data and retrieve the same by using the method retrieveFromCache provided by kony middleware API. If you wish to load the data by explicitly making the service call then you can call the endpoint service to get the data. 
The complete handle is with you in the java service whether to make the service call or load the data from the cache.
You can get the list of API's provided by Java javaservice2.
Refer the ehcache interface documentation in the Middleware API guide, you can use 
retrieveFromCache and insertIntoCache if you want to retrieve and store the data in the cache.
http://developer.kony.com/MiddlewareAPI
Kony is using the ehcache which is a third party open source provided by symphony. You can refer the below link for more info regarding this.
https://web.archive.org/web/20101203152110/http://www.opensymphony.com/oscache/api/index.html

Note : Data caching is OS level. All the cached data will be stored in the server where you have first stored the data. If the next request goes to the other server then the cached data will be null. 
Once the time gets expired then the return value of the retrieveFromCache will be null. Even in this case you can make a service call to get the data again from the backend.

 

Let me know if you have any queries regarding this further.

 

Thank You,

Arif

 

Replied by: Apr 10, 2017 15:17 EDT
Vote up!
0 votes
Vote down!

Thanks Arif,

I am new with Kony, can you please navigate me through the screen where i can see the find the cache stats(if we have any such monitoring screen).

 

Regards,

Pankaj 

Replied by: Apr 10, 2017 23:26 EDT
Vote up!
0 votes
Vote down!

Hello Pankaj.

 

You can refer the below link to get the idea regarding this in the mobile fabric console. 

http://docs.kony.com/konylibrary/mobilefabric/kony_mobilefabric_user_guide/Content/Java_Preprocessor_Postprocessor_.htm

 

Thank You,

Arif

 

Replied by: Apr 11, 2017 02:28 EDT