Post by kittykat » Wed Jul 01, 2015 12:54 pm

Currently, Opencart doesn't generate cached versions of images until a visitor loads a page in which these images appear.

I've recently added a lot of new product photos, which means large portions of my site are going to be slowed down while they get cached.

Is it possible for me to manually generate a full image cache?

Newbie

Posts

Joined
Mon Mar 18, 2013 8:04 am

Post by Dhaupin » Wed Jul 01, 2015 11:03 pm

Thats a cool idea, there is prob a way to make a cron script or something to reiterate through all the OC entities. But in the meantime, you can initiate your own spider to hit all the sites pages using http://home.snafu.de/tilman/xenulink.html

This would effectively generate *all* caches. I would run it before you go to sleep or something later in the night. Make sure its throttled and threaded down some too or else you may crash your server because of too many requests

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by kittykat » Thu Jul 02, 2015 11:53 am

Dhaupin wrote:But in the meantime, you can initiate your own spider to hit all the sites pages using http://home.snafu.de/tilman/xenulink.html
Aha, that would work just fine. Granted this will only generate the category and product page images, but those are by far the most important ones in terms of page speed.

Thanks

Newbie

Posts

Joined
Mon Mar 18, 2013 8:04 am

Post by tjsystems » Thu Jul 02, 2015 6:36 pm

I use a 'show all products' mod for this. Quick and easy!

Live with 2.2.0.0 fully SSL.


Active Member

Posts

Joined
Sun Aug 26, 2012 5:39 pm
Location - NL, Amsterdam

Post by Dhaupin » Thu Jul 02, 2015 10:26 pm

kittykat wrote:
Dhaupin wrote:But in the meantime, you can initiate your own spider to hit all the sites pages using http://home.snafu.de/tilman/xenulink.html
Aha, that would work just fine. Granted this will only generate the category and product page images, but those are by far the most important ones in terms of page speed.

Thanks
It will hit any page that is linked to, including those from the sitemaps. So itll do manufacturer, info, contact, etc too.

And @tjsystems what do you mean by a view all mod? Just a list? Getting all the products without pagination in a store is easy...just search for a space and put &limit=99999 at the end of the url. This will crash your tab and possibly server though on a large store ;)

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by kittykat » Wed Jul 08, 2015 2:40 am

Dhaupin wrote:It will hit any page that is linked to, including those from the sitemaps. So itll do manufacturer, info, contact, etc too.
True. I had been thinking of cart/wishlist etc mini images that wouldn't be cached until someone added an item to such a list.

Newbie

Posts

Joined
Mon Mar 18, 2013 8:04 am

Post by IP_CAM » Wed Jul 08, 2015 9:37 am

And @tjsystems what do you mean by a view all mod?
probably this one:
http://www.opencart.com/index.php?route ... on_id=7988

Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by hpapagaj » Fri Jan 15, 2021 9:01 am

After many years I still can't find a good solution for this. Because of the OC behaviour, it is only generating image cache files, when the actual product page is opened I see full off 404 errors in apache log:

[Fri Jan 15 01:41:42 2021] [error] [client 66.249.76.4] File does not exist: /public_html/image/cache/data/ktlg/001166-370x300.jpg
[Fri Jan 15 01:42:28 2021] [error] [client 66.249.76.4] File does not exist: /public_html/image/cache/data/ktlg/052628-370x300.jpg

370x300 is the actual product image, which is missing, because Google is querying only the image.

I am also thinking to ignore cache system by using full images, just with set width. You say I will have speed issues? Generating x versions of image cache is not a lightweight task either.

Anyone has a good solution?

Newbie

Posts

Joined
Sat Apr 18, 2015 3:43 am

Post by straightlight » Fri Jan 15, 2021 10:43 am

After many years I still can't find a good solution for this.
How patient one can be. It might seem a bit confusing as well as to know how, and maybe why, it might be your first post about it since on this topic.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 333 guests