Please guide me how i can validate the cache in Kony and monitor the stats of Cache. e.g. total chache size, available cache, cache defined for?
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.
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.
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.
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).
You can refer the below link to get the idea regarding this in the mobile fabric console.
This feature is available for registered users only. Please log in to access this and many other cool features of Kony Community.