Ejemplo n.º 1
0
        public clsCache cCache(Page PageActual)
        {
            clsCacheControl cCacheControl = new clsCacheControl();
            clsCache        cCache        = new clsCache();

            cCache = clsSesiones.getCache(PageActual);
            string sSesion = null;

            if (cCache != null)
            {
                cCacheControl.GuardaSesion(sSesion);
            }
            else
            {
                sSesion = cCacheControl.RecuperarSesionId(PageActual);
                if (sSesion != null)
                {
                    cCache = cCacheControl.RecuperarSesion(sSesion);
                }
                else
                {
                    cCache = null;
                }
            }
            return(cCache);
        }
Ejemplo n.º 2
0
        public clsCache cCache()
        {
            clsCacheControl cCacheControl = new clsCacheControl();
            Page            PageActual    = null;

            if (HttpContext.Current.Handler is Page)
            {
                PageActual = HttpContext.Current.Handler as Page;
            }

            string   sSesion = null;
            clsCache cCache  = new clsCache();

            if (PageActual != null)
            {
                cCache = clsSesiones.getCache(PageActual);
            }
            else
            {
                sSesion = cCacheControl.RecuperarSesionId();
                if (sSesion != null)
                {
                    cCache = cCacheControl.RecuperarSesion(sSesion);
                    cCacheControl.GuardaSesion(sSesion);
                }
                else
                {
                    cCache = null;
                }
            }
            return(cCache);
        }