New answers tagged

1

Have you tried setting the Caching properties by using the RenderingItem class? I assume you are getting all rendering items or the current rendering in the controller and you can set the caching option on them var renderings = Context.Item.Visualization.GetRenderings(Context.Device, false); foreach (var rendering in renderings) ...


5

The Sitecore.Jobs.Job and Sitecore.Jobs.JobOptions classes have been removed in Sitecore 9.2. In their place you now have BaseJob and BaseJobOptions abstractions with DefaultJob and DefaultJobOptions concrete classes In your case you can use DefaultJobOptions. You can see the constructor looks to be the same like on JobObtions. public DefaultJobOptions( ...


0

You could implement your own Caching (either sitecore custom cache if you want to see it also on the /sitecore/admin/cache.aspx page or application cache) for the list of users returned by your query, this way you would only run the query once. Then when users are requesting changes to their profile in the website you also add/remove them from the cache ...


0

Create a patch config and add the following setting and update the values <!-- MAIL SERVER SMTP server used for sending mails by the Sitecore server Is used by MainUtil.SendMail() Default value: "" --> <setting name="MailServer" value="#{MailServer}#" patch:instead="setting[@name='MailServer']"/> <!-- ...


0

You can retrieve the client Interactions by using the contact ID. var contactID = Guid.NewGuid(); // Replace with real contact ID IAsyncQueryable<Interaction> queryable = client.Interactions .Where(x => x.Contact.Id == contactID); var enumerator = queryable.GetBatchEnumeratorSync(20); while (...


0

You might try to rework your code by using RolesInRolesManager.IsUserInRole method instead - it is cache-based, which might help you to resolve performance issues. On one of our previous projects that did resolve a quite similar case. I hope, that was helpful for you.


0

Instead can use Domain.GetDomain("domainName").GetUsers() which is much faster than UserManager.GetUsers(). For reference, please have a look at below attached url https://sitecorecontextitem.wordpress.com/2014/07/28/get-all-sitecore-users-by-domain/


0

Sitecore user management is based ASP.Net Membership. () The architecture of ASP.Net membership wasn't designed to perform operations that you try to do quickly. How your code will work internally: It will get all users (80K) It will deserialize all profiles (Profiles are saved in a separate table. They are saved in the serialized way for flexibility to add ...


-1

If you want to change the username for the existing sitecore users, there is no direct way to do that programmatically. Neither the user manager nor the API of Sitecore provides a way to rename a User, the only possibility would be to create a new user and set the same roles on it. The only option would be to do change directly in the database, although I ...


Top 50 recent answers are included