Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

What are best practices for performance ?
Hrvoje_86
#1 Posted : Wednesday, July 27, 2011 5:29:59 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 154
Location: Croatia
What are best practices for caching and performance ?

Is there some best practice how long should i request be cached?

Should i use asp.net built in caching or some kooboo caching mechanism?

Can someone give an example how to setup caching properly with kooboo?
jifeng
#2 Posted : Thursday, July 28, 2011 8:46:11 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
HI

Because all the site elements are stored as Directories OR files on the disk, we enable the caching for site elements data to improve the performance. All caching should be keep alive until it is changed on the CMS. When you modify the disk file data directly, the caching will not be notified because there is no file dependency on the caching. You can clear the site caching under the site setting manually, there is a "Clear caching" button under the site setting.

Kooboo cms uses the new caching API in .NET4(System.Runtime.Caching), it can be extended. We expect to provide the distributed caching provider for Kooboo cms. We have wrapped the caching manager for every site to help the developer to use it easily. Here is the example:

Code:

site.ObjectCache().Add(cacheKey, o, CacheProviderFactory.DefaultCacheItemPolicy)


If you want to clear the clear all the caching under the site, you can invoke the ClearCache:
Code:

site.ClearCache()
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Hrvoje_86
#3 Posted : Thursday, July 28, 2011 9:59:52 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 154
Location: Croatia
Hi.

I have problems with a site on kooboo 2 actually.
Kooboo 3 is running much faster.

So i wonder where is it best to cache data rule ?

Output cache on content template or layout template ?

In web.config ?

I believe the the fastest method would would be something similar to output cache in normal asp.net because all logic and querys would be skiped, but i am not sure how to do that in kooboo 2.

I have read that in mvc output cache should not be used in view(content template) and that it should be used in the controller.
I can't access the controller in kooboo but i would like to cache the entire html response for some requests
such as the hompage because it really has a lot of querys and parsing rss.
Is that possible to setup in kooboo 2?
jifeng
#4 Posted : Thursday, July 28, 2011 10:09:26 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
HI

What you are saying is about the output cache. In Kooboo CMS3, you are able to control the page output cache OR just a view output cache on the page.

Please check carefully under the page setting, there have the output cache setting for the whole page. And you can also find that when you add a view, there have the parameters allow you to set the output cache.

Sorry, that have not any settings in kooboo cms2.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Hrvoje_86
#5 Posted : Thursday, July 28, 2011 12:43:05 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 154
Location: Croatia
So my only option for caching in kooboo 2 is data rule caching?

I enabled caching on all data rules and it still takes 3 seconds for the front page to load.

I wanted to enable output caching on II7 but i have to enter a file extension and since this is mvc there is no extension.

What about the enterprise caching library in web.config.
Does it have any options to cache entire request for a fixed amount of time?
jifeng
#6 Posted : Friday, July 29, 2011 2:53:54 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,552
Location: Xiamen China
Yes, only data rule can be cached in Kooboo CMS2.


Can you trace the page to find out which step take effect the performance?
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.084 seconds.