Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > 13 sec page-load after cleared cache? View modes: 
User avatar
Member
Member
cgilbu - 10/26/2011 7:50:22 AM
   
13 sec page-load after cleared cache?
Why would it take approx 13 sec to load a page with almost no content (literally), after cache has been cleared in "System -> Clear cache"?

Thanks for any reply!

User avatar
Member
Member
lancetek - 10/27/2011 4:54:35 AM
   
RE:13 sec page-load after cleared cache?
Kentico Caching is awesome.

When you clear the cache, you force your application to retrieve all the information from slow disk and process it again, and put the used info back into the cache.

Caching speeds up my sites by a few orders of magnitude - and allows them to serve many more users than the hardware would, if I didn't take advantage of the Kentico caching.

It's like if someone wiped your memory and you had to go look everything back up using books... it's much slower to look things up physically then have to recall from your brain's RAM.

I think that I saw in v6 that you can pick and choose cache items to remove, rather than blotto the whole thing.

Kentico has quite a few objects that are populated behind-the-scenes. Try loading up your empty page and then go look into the cache to see the list of objects that have been cached - check out the System > debug tab in Site Manager.

If you don't have the debug tab: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?bulk_keys_for_all_debugs.htm

I've just restarted the application in dev - the application is using 12MB of memory - 2300 Hash tables cached and 2200 objects, but the System page only says 3 items cached. Whe I load a single page those number increase to: 44MB, 3900 Hash tables, 2800 objects and 5 items cached.

Now if I 'Clear the Cache' the numbers reduce slightly - 23MB, 2300 Hash tables and 2200 objects, with 0 items cached on the System page.

So you can see that loading a single page forces Kentico to hydrate the cache and (in my instance) create 1600 Hash Tables and 500 Object caches. It does this in about 10 seconds or so, but subsequent page fetches (that are now hitting the cached objects)are lightning quick.

Cheers,
Lance