  {
            _duration = Duration;
        }


        /// <summary>
        /// 方法执行前
        /// </summary>
        /// <returns></returns>
        public string OnActionExecuting()
        {
            var result = "0,60";
            if (!HttpContext.Current.Session.CachedPath.Contains(HttpContext.Current.Request.Url))
            {
                HttpContext.Current.Session.CachedPath.Add(HttpContext.Current.Request.Url, DateTime.Now.AddSeconds(_duration));
                result = "0" + "," + _duration;
            }
            else
            {
                var cp = HttpContext.Current.Session.CachedPath.Get(HttpContext.Current.Request.Url);
                if (cp != null)
                {
                    result = "1" + "," + (int)(cp.Expired - DateTime.Now).TotalSeconds;
                }
            }
            return result;
        }
    }
}


# coding: utf-8

"""
    Kubernetes

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: v1.7.4
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


class AdmissionregistrationApi(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def get_api_group(self, **kwargs):
        """
        get information of a group
        This method makes a synchronous HTTP request by default. To make 