I'm so confused...

AndreyPopov

Well-Known Member
#22
I did an entire search of my website for "$SERVER('LS_CACHE_CTRL') "
$SERVER('LS_CACHE_CTRL') - is PHP variable.

create file info.php with

PHP:
<?php
phpinfo();
?>
but problem not in this.

catalog/controller/extension/module/lscache.php

must contain:

PHP:
if (isset($this->lscache->setting['module_lscache_vary_mobile']) && ($this->lscache->setting['module_lscache_vary_mobile'] == '1') && $this->checkMobile($userAgent)) {
                    $device = $this->checkMobile($userAgent);
                    $cookies1[] = '_lscache_vary=device%3A' . $device . ';lsc_private=e70f67d087a65a305e80267ba3bfbc97' ;
                }

                if(isset($this->lscache->setting['module_lscache_vary_safari']) && ($this->lscache->setting['module_lscache_vary_safari'] == '1') && $this->checkSafari($userAgent)) {
                    $cookies1[] = '_lscache_vary=browser%3Asafari;lsc_private=e70f67d087a65a305e80267ba3bfbc97' ;
                }
but ...... this code contain ERROR!!!!!!!!!!!!!!!!!!!!!!!!!

:(

really BUGGY code added by developers.


for iPhone with Safari must be added:

Code:
_lscache_vary=browser%3Asafari,device%3Amobile
without lsc_private=e70f67d087a65a305e80267ba3bfbc97

code add:
lscache_vary=device%3Amobile;lsc_private=e70f67d087a65a305e80267ba3bfbc97
OR
_lscache_vary=browser%3Asafari;lsc_private=e70f67d087a65a305e80267ba3bfbc97

that's why crawler for iPhone not recache :(
 
Last edited:

Lee

Well-Known Member
#23
OK, there are several things here:

  1. Even without specifying ANY UA's it's now very very slow.
  2. It looks like it made your extension stop working
  3. There is no PHP variables for LS_CACHE
  4. It still crashes every 10-12 cache lines, it will never ever finish
  5. when I run the cli command again, it still rebuilds cache so it never sees that it already cached like it did before.
There are so many issues now I don't even remember what they are!
 

AndreyPopov

Well-Known Member
#24
Even without specifying ANY UA's it's now very very slow.
yes. without "magic" curl option curl_setopt($ch, CURLOPT_ENCODING, "");
nearly 600-1000 urls per hour for one UA.

with "magic" curl option - nearly 2000-3000 urls per hour.


It looks like it made your extension stop working
I not check how work my extension after last commits :(


There is no PHP variables for LS_CACHE
it's only visible on device or in browser developer mode with device emulation UA

It still crashes every 10-12 cache lines, it will never ever finish
when I run the cli command again, it still rebuilds cache so it never sees that it already cached like it did before.
what amount of php memory?
what number of links you try recache?
 
Last edited:

Lee

Well-Known Member
#25
Can you just save me from all of this and provide me a fully functional program and all the files to add to opencart? This going back and forth is hurting my head...

I removed your extension and it's still so damn slow it's not functional and it crashes every dozen lines and like I said, it doesn't even realize that I had already run the program (it should go faster the second time I run it)
 

Lee

Well-Known Member
#28
Seems like the developers don't care much. They should be monitoring this site and seeing all the issues I've been having and they should be offering help instead of letting users fix it for them.

Maybe there's other reasons like Journal3 that may be the issue but either way it's been a headache.
 

serpent_driver

Well-Known Member
#30
Maybe there's other reasons like Journal3 that may be the issue but either way it's been a headache.
In a certain respect you are certainly right with your accusations, but the problem has to be put into perspective. The cache extension for OC actually works perfectly as long as you don't use Journal 3 and you don't use the crawler, because Journal 3 has a device detection and generates different code depending on the device. In itself, this device detection is not a problem because LScache supports it with the "Cache Varies". However, the crawler is not able to generate the different simulations for each device. It is therefore a waste of time to search for a solution longer so that you can do a cache warmup with the integrated crawler.

If you absolutely don't want to or can't wait until I make my cachecrawler available online, then another crawler could help you, at least temporarily. LiteSpeed has a standalone crawler that, paradoxically, is only offered for Magento. However, this crawler can be used universally and supports at least rudimentary mobile devices. However, it does not differentiate between iPhone and Android devices. The same also applies to webp.

If you have SSH access, you can use this crawler in the console.

Check it out https://docs.litespeedtech.com/lscache/litemage/crawler/

Btw.: You said that you have problems with insufficient memory. Then you might want to consider using another hosting from A2 Hosting. I use a test server from A2 Hosting for programming. It's also just shared hosting, but I use it to crawl shops with more than 100,000 items and I've never had problems with running out of RAM.
 

Lee

Well-Known Member
#31
Thanks, but I'm going to wait for your program!

Also, I'm not sure I'm running out of memory. I use 'top' in the Terminal and there's plenty of memory left when curl stops. Plus in cPanel it shows the memory usage and it only hits like 14% when I keep refreshing while curl is running.

Thank you for the help...
 

AndreyPopov

Well-Known Member
#34
if developers not correct issue in next two days, I post whole php files that work at me.


and @Lee, you not answer for question about PHP memory size?

also, see what session handler use your Opencart configuration?
 
Top