Пример #1
0
        //----------------------------------------------------------------------


        private void initCacheKey(ActionCache actionCache, MvcContext ctx)
        {
            if (actionCache == null)
            {
                return;
            }

            // 只在 GET 下缓存
            if (ctx.HttpMethod.Equals("GET") == false)
            {
                return;
            }

            _cacheKey = actionCache.GetCacheKey(ctx, _actionName);
            if (strUtil.HasText(_cacheKey))
            {
                _isActionCache = true;
            }
        }
Пример #2
0
        //----------------------------------------------------------------------
        private void initCacheKey( ActionCache actionCache, MvcContext ctx )
        {
            if (actionCache == null) return;

            // 只在 GET 下缓存
            if (ctx.HttpMethod.Equals( "GET" ) == false) return;

            _cacheKey = actionCache.GetCacheKey( ctx, _actionName );
            if (strUtil.HasText( _cacheKey )) {
                _isActionCache = true;
            }
        }