Cache on K2

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Feb 12, 2013 5:57 pm
Reply with quote
Report this post
Does anyone know how to reduce the size of the cache folder on K2 this media \ k2 \ items \ cache file because it generates many leaving the huge site (on the picture)

thank you
User avatar
Senior Boarder

GK User
Tue Feb 12, 2013 9:01 pm
Reply with quote
Report this post
I have the same problem. Spend a lot of research so far with no result. Hope we get an answer. Get trouble on my host.
User avatar
Expert Boarder

GK User
Thu Feb 14, 2013 1:58 am
Reply with quote
Report this post
Well I'll tell you how I solved the huge cache that generates K2, first answering the question why K2 generates this huge cache.
When you insert an image in an item (article) K2 it generates around 6 copies of the same images with different dimensions, to more than 6 copies?
These copies are used in different locations of the Project.
Images small commonly used as pre visualization in the form of inserting pictures and also the K2 index of items (articles) of K2.
Larger images are in use in category view, and also in item (articles) of K2 itself.
Well it did to solve a mixture of solutions indicated by JeanRocha (JoomlaClube Brazil) and by Jean Philippe (K2 Forum) guided me.

1 Enter each item of K2 and removed the images (turn zero whole cache)
2 Define the size of the image I wanted to use in my case medium size and the other set 0px
3 I went into each item of K2 reinserting each image in your particular item. Generating a cache with only a picture and five other pictures less than 2k.
4 I disabled the pop up images of items (by clicking it appeared only a white square and x, for the image used in the pop up as imagemXL was set to zero, no image)

I deleted the line of code in bold:

<A class = "modal" rel = "{handler: 'image'}" href = "<? Php echo $ this-> item-> imageXLarge;?>" Title = "<? Php echo JText :: _ (' K2_CLICK_TO_PREVIEW_IMAGE ');?> ">
<Img src = "<? Php echo $ this-> item-> image;?>" Alt = "<? Php if (! Empty ($ this-> item-> image_caption)) echo :: K2HelperUtilities cleanHtml ($ this -> item-> image_caption); else echo :: K2HelperUtilities cleanHtml ($ this-> item-> title);?> "style =" width: <? php echo $ this-> item-> imageWidth;?> px; height: auto; "/>
</ A>


Located in my_site/template/my_template/html/com_k2/template/default/item.php

Before
Size-generated backup with Akeeba Images enabled - 112.79 mb

After
Size-generated Akeeba backup with the changes and images enabled - 32.55 mb
User avatar
Senior Boarder

GK User
Mon Oct 03, 2016 4:38 am
Reply with quote
Report this post
Thank you Moska007
User avatar
Fresh Boarder

teitbite
Mon Oct 03, 2016 10:05 am
Reply with quote
Report this post
Hi

Yes, that's a really good explanation. I'm gonna tag it for future question: K2_IMAGES
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.