WikiFunctions.SiteInfo.CreateOrLoad C# (CSharp) Method

CreateOrLoad() public static method

public static CreateOrLoad ( IApiEdit editor ) : SiteInfo
editor IApiEdit
return SiteInfo
        public static SiteInfo CreateOrLoad(IApiEdit editor)
        {
            SiteInfo si = (SiteInfo)ObjectCache.Global.Get<SiteInfo>(Key(editor.URL));
            if (si != null
                && Namespace.VerifyNamespaces(si.Namespaces))
            {
                return si;
            }

            si = new SiteInfo(editor);
            ObjectCache.Global[Key(editor.URL)] = si;

            return si;
        }