Exemple #1
0
        /// <summary>
        /// 删除缓存
        /// </summary>
        /// <param name="accountId"></param>
        public static void RemoveUserBody(string accountId)
        {
            IMongoQuery x     = Query.EQ(nameof(UserBody.UserInfo) + "." + MongoDbRepository.MongoKeyField, accountId);
            var         cache = MongoDbRepository.GetFirstCacheRec <UserBody>(x);

            if (cache != null)
            {
                MongoDbRepository.DeleteRecPhysical <UserBody>(cache);
            }
        }
Exemple #2
0
        /// <summary>
        /// 删除缓存
        /// </summary>
        /// <param name="accountId"></param>
        public static void RemoveArticleItemBody(string articleId)
        {
            IMongoQuery x     = Query.EQ(nameof(ArticleItemBody.ArticleInfo) + "." + MongoDbRepository.MongoKeyField, articleId);
            var         cache = MongoDbRepository.GetFirstCacheRec <ArticleItemBody>(x);

            if (cache != null)
            {
                MongoDbRepository.DeleteRecPhysical <ArticleItemBody>(cache);
            }
        }