如何增加LVL缓存有效时间?缓存、有效、时间、LVL

2023-09-04 10:12:58 作者:╭ァ再回首ヾ恍然如夢

我在我的应用程序实现拉特服务器管理的策略。我知道,拉特服务器响应缓存在设备一段时间,从而使用户能够使用的应用程序,而不INTERENT连接(LVL使用缓存许可证的话)。我想知道,周期究竟有多长,我怎么能增加。 基本上,LVL我实现了检查许可每次应用程序启动时,我想,以增加高速缓存有效时间为60天。

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.

推荐答案

我还没有发现的LVL缓存时间由谷歌服务器设置的实际价值,但我发现怎么改。在 ServerManagedPolicy.java 文件更改:

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"));

到任何你喜欢(在这里30天):

to whatever you like (here to 30 days):

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