Beispiel #1
0
 /// <summary>
 /// 添加或更新用户关联信息。
 /// <para>添加的信息会在超时后自动移除。超时时间为滑动时间。</para>
 /// </summary>
 /// <param name="toOpenID">微信公众号openid</param>
 /// <param name="userid"></param>
 /// <param name="data"></param>
 public static void Set(string toOpenID, string userid, UserContext data)
 {
     var key = KeyCreator(toOpenID, userid);
     HttpRuntime.Cache.Insert(key, data, null, Cache.NoAbsoluteExpiration, new TimeSpan(0, 0, Timeout, 0));
 }
Beispiel #2
0
        /// <summary>
        ///     添加或更新用户关联信息。
        ///     <para>添加的信息会在超时后自动移除。超时时间为滑动时间。</para>
        /// </summary>
        /// <param name="toOpenID">微信公众号openid</param>
        /// <param name="userid"></param>
        /// <param name="data"></param>
        public static void Set(string toOpenID, string userid, UserContext data)
        {
            var key = KeyCreator(toOpenID, userid);

            HttpRuntime.Cache.Insert(key, data, null, Cache.NoAbsoluteExpiration, new TimeSpan(0, 0, Timeout, 0));
        }