Ejemplo n.º 1
0
        public override void Load(XmlElement config)
        {
            base.Load(config);

            this.Id      = config.GetAttribute("id");
            this.Params  = ConfigContext.GetXmlConfigParams(config, "param");
            this.Query   = ConfigContext.GetXmlConfigParams(config, "query");
            this.Actions = ConfigContext.GetXmlConfigParams(config, "action");

            var cache = config.GetAttribute("cache");

            if (cache.HasValue())
            {
                this.Cache = Scope.Caches[cache];
            }
        }
Ejemplo n.º 2
0
        public override void Load(XmlElement config)
        {
            base.Load(config);

            this.Id              = config.GetAttribute("id");
            this.Type            = config.GetAttribute("type");
            this.Params          = ConfigContext.GetXmlConfigParams(config, "param");
            this.FlushOnExecutes = ConfigContext.GetXmlConfigList(config, "flushonexecute", "sqlmap");
            this.Provider        = CreateCacheProvider();

            var flushinterval = Params.GetValue("flushinterval", 0);

            if (flushinterval > 0)
            {
                this.FlushInterval = TimeSpan.FromMinutes(flushinterval);
            }
        }