How to increase LVL cache-valid time?

前端 未结 1 1925
一向
一向 2021-02-10 00:27

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 inter

相关标签:
1条回答
  • 2021-02-10 00:35

    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)));
    
    0 讨论(0)
提交回复
热议问题