How to increase LVL cache-valid time?

拈花ヽ惹草 提交于 2019-12-05 02:31:44

问题


I've implemented LVL server managed policy in my app. I know that lvl server response is cached in a device for some period of time so users are able to use a app without interent connection (lvl uses cached license then). I would like to know exactly how long that period is and how I can increase it. Basically, lvl I've implemented checks license everytime the app starts and I would like to increase cache-valid time to 60 days.


回答1:


I haven't found the actual value of the lvl cache-time set by google servers, but I found how to change it. In the ServerManagedPolicy.java file change:

setValidityTimestamp(extras.get("VT"));

to whatever you like (here to 30 days):

setValidityTimestamp(String.valueOf(System.currentTimeMillis() + (MILLIS_PER_MINUTE * 60 *24*30)));


来源:https://stackoverflow.com/questions/16567842/how-to-increase-lvl-cache-valid-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!