dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasfind.mobigoMobi

Posted by santhoshm 1 year 10 weeks ago

pic
 santhoshm
mobiForge Newbie
Posts: 1
Joined: 1 year ago
[offline]

I heard from the DeviceAtlas site that, we can automate downloading the device repository(da.jason) at specific intervals.

My question is:

Does DeviceAtlas APIs provide a facility to cache the jason file in memory so that file will not be read at every Api.getTreeFromFile("jason_file_path") API call ?

If it does caching, does it provide a way to refresh the cache automatically (at specified interwals) without mannual intervention ?

Posted by atrasatti 1 year ago

pic
 atrasatti
dotMobi logo
Mobile Genius
Posts: 325
Joined: 3 years ago
[offline]

If you are talking about the Java API, a check is made on the file timestamp, so it should automatically refresh the in-memory cache. In our tests we noticed that using for example tomcat, the update is not always immediate and sometimes takes even a few seconds.

The new version of the API that will come soon, has a better way of exposing the cache and allowing you to manage it.