Commit 2867490fb9423819b9d7ad213071c96260428ee5

Authored by 来诺
Committed by GitHub
1 parent 890b6cc5
Exists in master

Reduce js_ticket expiration to 6600s

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
lib/dingtalk/api/base.rb
@@ -26,7 +26,8 @@ module Dingtalk @@ -26,7 +26,8 @@ module Dingtalk
26 key = "#{@corp.corp_id}_#{JS_TICKET}" 26 key = "#{@corp.corp_id}_#{JS_TICKET}"
27 res = http_get("get_jsapi_ticket?access_token=#{access_token}") 27 res = http_get("get_jsapi_ticket?access_token=#{access_token}")
28 redis.set(key, res['ticket']) 28 redis.set(key, res['ticket'])
29 - redis.expire(key, res['expires_in']) 29 + # redis.expire(key, res['expires_in'])
  30 + redis.expire(key, 6600)
30 redis.get(key) 31 redis.get(key)
31 end 32 end
32 33