コード例 #1
0
        public bool CanEdit(Guid listId, SPListItemGetOptions options)
        {
            var cacheId = CanEditCacheKey(listId, options);
            var canEdit = (bool?)cacheService.Get(cacheId, CacheScope.Context | CacheScope.Process);

            if (canEdit == null)
            {
                canEdit = listItemService.CanEdit(listId, options);
                cacheService.Put(cacheId, canEdit, CacheScope.Context | CacheScope.Process, new string[] { }, CacheTimeOut);
            }
            return((bool)canEdit);
        }