Keyword

Eight Questions About How K2 Handles Cache

  • marioglez
  • marioglez's Avatar Topic Author
  • Offline
  • New Member
More
13 years 3 months ago #98849 by marioglez
Greetings my fellow K2 community members! It is almost 4am here on the united states 's west coast and i can't sleep. So I figured I stay up a little longer and ponder the wonderful world of K2, joomla, joomla's cache, and how they play with one another! Here i have a few caching questions that i am sure everybody in the community can benefit from. It is my hope and humble request that a few of you seasoned K2/joomla power users can share some of your cache technical wisdom.

 

If you don't know the answer to all the questions, then I would greatly appreciate if you can answer those that you do know! :)
I've been clearing the whole cache when saving new and/or editing K2 articles. But as the website's cache rebuilds itself, it takes about 4-7 seconds for each page to download, as oppose to less than a second when the cache is fully rebuilt. I often notice a drop of page views (on google analytics) per visitor and overall on the day when the cache is rebuilding itself. It doesn't make sense to clear the whole cache when making a simple K2 page update--specially for larger sites.

So, it is my goal and objective to make sure that that my server serves cached K2 content fast, snappy, and in most efficient manner in order increase page views, reduce the "bounce back" rates, and overall improve visitor's experience!

So, okay, let me get right to it. Lets assume a K2 website is updated weekly, but sometimes daily. And let us also assume this is the
website's setup:


Joomla v1.5.23
The whole 100+ page website is built on K2 v2.4.1.
NoNumber!'s "Clean Cache" plugin is on and set to clean everything on "apply" and "save" on both the frontend and the backend admin interfaces.
"Global Configuration" >> "System" >> "Cache Settings" set to "yes", "Cache time" set to "43200" minutes (one week).
"System - Cache" plugin is published (last one in the order or plugins) with "Use Browser Caching" set to "yes" with a "Cache lifetime" of "43200" minutes (also one week).

Moreover, let us assume that the "new" K2 content exists on: - Home page as featured (newest articles) content - As a combination of modules (K2 content and K2 tools) on a blog section of the website.

- It exist in its default page, which is a K2 sub category menu listing.

- Over all, the newly created K2 content exists in about 20-25% of the website.

So here are the K2 cache questions:

Question # 1: When saving a new K2 page (or editing an existing), what does K2
actually do with the cache?

Question # 2: Specifically, how is K2 handling of the cache different from the way joomla articles handle theirs?

Question # 3: What would happen to the K2 articles, and K2 modules content (for both new and existing articles), if we choose not clear the whole cache when adding, and/or editing articles? Is there even a need to clear the whole website cache when saving or editing K2 articles because of the way K2 handles cached content?

Question # 4: This is more a joomla cache question. In order to speedup the website when registered folks are logged in, is there a way to force 90% of modules to be cached (and therefore reducing the amount of database queries)?

Question # 5: If we were to change the K2 sizes of the images in the K2 parameters, will the whole website rebuild the images from the original uploaded image file? For a larger website it wouldn't make a lot sense to re-upload every single image in order for the new size parameters to kick in...

Question # 6: Have you guys tried JotCache? And if so, can you share your experiences with it?

 

Question # 7: Do you guys know when the search engines web crawlers go through a joomla site if the cache pages gets rebuilt if that page hasn't been accessed by a "normal' visitor?

Question # 8: Do you have any tips, tricks, or suggestions?

Please Log in or Create an account to join the conversation.

  • marioglez
  • marioglez's Avatar Topic Author
  • Offline
  • New Member
More
13 years 3 months ago #98850 by marioglez
Replied by marioglez on topic Eight Questions About How K2 Handles Cache
I realized that perhaps I asked a lot questions, but I think every one in the K2 community can benefit from this cache knowledge in order to speedup their K2 based sites.

Please Log in or Create an account to join the conversation.

  • JoomFlix - By Total Design And Technology
  • JoomFlix - By Total Design And Technology's Avatar
  • Offline
  • New Member
More
13 years 1 month ago #98851 by JoomFlix - By Total Design And Technology
Replied by JoomFlix - By Total Design And Technology on topic Eight Questions About How K2 Handles Cache
I'm in a bad spot right now with a major site (J! 1.5, K2 2.4) and am desperate for answers as to why the site cpu spikes with about 100-150 users and crashes the server.  Obviously the client, the hosting company and I are all unhappy with this situation.  I've tried using a CDN to serve images/css/js, turning off and deleting all the non-essential components/et and even installing and implementing memcache and nothing helps or even has a noticeable affect.

 

I have no idea if K2's cache is the problem, but I have seen others complain about high CPU usage and large k2 cache files so I will try to look at that next.

 

As far as your questions:

 

1. I scanned the K2 code (2.4.1) for 'cache' and all I found was commands to clear the Joomla! cache when an item is saved.  I thought I read somewhere that K2 did a 'smart' clean and didn't clear the entire cache but only refreshed the newly saved item.  I didn't find any thing other than a brute force clean of all cache items when an item is saved.

 

2. K2 also stores images in its own cache file in the media folder.  I didn't research this but I guess it stores different size images there.  Other than that, the only thing I see related to cache is the 'clean' on save.

 

3. I don't think you need to do the nonumber cache clean because k2 cleans the cache when an item is saved.  This is actually a good thing if you want guests to see the latest content.  Otherwise guests will only see the content after the cache period has expired.  I'm not sure why that works that way, but it does.

 

4. I don't know what is magic about 90% of the modules, but Andrew Eddie discusses how to make modules be cacheable on his artofjoomla site.  Module developers should have the code to allow their modules to be cached and you may have to enable each individual module.  If not, you may have to add the XML code yourself to the module.

 

5. I don't know if K2 would resize images, but I would be shocked if it did.  That could be a huge operation on a large site.

 

6. Never tried or heard of JotCache - do you have any experience with it?

 

7. I would think that a crawler would have the same effect as a regular visitor.  Remember k2 empties the cache on save, so guests/spiders would see the all the linked pages.

 

8.  I have read everything I can on J! performance, caching, etc. and nothing has helped.  I have also spent more time in the past 2 weeks studying and learning about Apache logs, Unix commands, PHP settings, etc and I'm no better off than when the site was launched 2 weeks ago.  It goes down about 3-4 times a day during the peak work hours.   I'm extremely frustrated so  if anyone out there has specific expertise in this area, please contact me.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum