Carrotware.CMS.Core.CMSConfigHelper.ClearSerialized C# (CSharp) Method

ClearSerialized() public static method

public static ClearSerialized ( System.Guid itemID, string sKey ) : bool
itemID System.Guid
sKey string
return bool
        public static bool ClearSerialized(Guid itemID, string sKey)
        {
            bool bRet = false;
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                carrot_SerialCache itm = CompiledQueries.SearchSeriaCache(_db, itemID, sKey);

                if (itm != null) {
                    _db.carrot_SerialCaches.DeleteOnSubmit(itm);
                    _db.SubmitChanges();
                    bRet = true;
                }
            }
            return bRet;
        }

Same methods

CMSConfigHelper::ClearSerialized ( string sKey ) : bool

Usage Example

 public static void RemoveSerializedExportData(Guid rootContentID)
 {
     CMSConfigHelper.ClearSerialized(rootContentID, keyPageImport);
 }