I believe the default cache timeout for object cache is 12 hours - check the settings in web.config (episerver/applicationSettings - pageCacheSlidingExpiration-attribute) that you have not set a too short timeout for this. If you're in edit-mode, the pages are not loaded from cache, this is normal.
If the cache settings look good and you're still seeing that the pages are not loaded from cache after a few minutes, this sounds like the application pool is being recycled. This could happen if you have a lot of exceptions that occur in a short time span so the IIS rapid fail protection is triggered - check the logs for any exceptions.
If you're still having problems, and it works as expected in your development environment, you should contact Episerver support who will hopefully be able to assist.
On a side note, you should use IContentLoader instead of IContentRepository if you don't need to save/update content.
Hi Tonvang,
Thanks for your update. applicatioSettings looks good and there are no application level exceptions.
May be i need to check with Episerver support team.
Thanks,
Suresh B
I would suggest to do a profiling of your request (using dotTrace is preferred) and send the result to the support team, that will speed up the process
https://world.episerver.com/blogs/Daniel-Ovaska/Dates/2019/3/performance---getchildren/
4. Avoid doing recursive searches in page tree / FindPagesByCriteria. Use Episerver Find or similar to get what you need instead or solve it in another way. And if you do use recursive search in tree, cache the result for the public user so you at least only do it once.
Hi Daniel,
Can we use "GetDescendants" to get all childrens under folders? Is this "GetDescendants" results get from content cache or from database?
Thanks,
Suresh B
Note that GetDescendents will be recursive, and it only returns the references of the descendents, not the descendents themselves. The default implementation uses GetChildren to get the direct children, so it will be cached or uncached, but then use direct database access (uncached IIRC) to get deeper level descendents
Hi Quan,
Let's say i have below folder structure.
Occupations
-Industry1
-Occupation1
-Occupation2
-Industry2
-Occupation3
-Occupation4
So here i have around 6000+ occupations categorized with industry folder structure. What is the best way to retrieve all occupations across all industries without performance impact?
I have requirement to show all occupations in searchable dropdown. I cannot use Episerver Find as it will return max 1000 records and i need to hit find service min 6 times to get all occuaptions.
Do you really need to display all 6000 occupations initially? If you use some searchable Javascript dropdown component you can create a rest api endpoint that searches Find and delay searching until the user has entered 2-3 characters or so.
Yes, i need to display 6000 occupations. My requirement is, user can search or select from dropdown.
Your best option would be using an indexed search, like, Find, to load/search all contents instead of using the content API directly
Even if you have to hit Find six times, it will still be faster than loading from DB. You can then cache the results, so it will only hit Find the first time.
We are planning to change occupation selection behavior. Now going to integrate autosuggestion behavior.
I am referring below link for Episerver Find autocomplete example. Do we have any option to pass pagetype filter so i can only filter Occupations and get occupation specific results.
Hi Team,
My application is facing lot of performance issues with IContentRepository methods. Always first requesting is taking minimum of 10 seconds to get any content page by using IContentRepository.Get<T>(ContentReference contentLink) method. From sencond request onwards it is quick.
Whenever application is in ideal state for 15min then first request always taking so much time to get the data. Because of this few of customers are facing performance issues.
I have idea that Episerver caches the content first time and from next time onwards retrieve from cache for quick response. I am not understanding why Get method is taking lot of time to retrieve when system is in ideal for sometime.
Am i missing any configuration settings? My current application is running in DXC environment.
Thanks,
Suresh B