Post by teratyke » Thu May 17, 2012 9:44 pm

I build my cache using Xenu's Link Sleuth - have you tried that? I've been using it a lot less since Jay introduced the timed expiration feature.
Rob

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by Ampeter » Thu May 17, 2012 10:41 pm

Is there a way to know the url a cache file corresponds to by looking at its name?

It seems for some reason Link Sleuth is creating cache files with the same content but a different name than the ones created when you use your browser(even though I pasted the exact same url on both!), thats why I didn't notice any speed improvement with a link crawler... strange!

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by JAY6390 » Thu May 17, 2012 10:48 pm

I see. They should be identical unless one's using seo urls, and the other isn't. Or one is using a different domain, ie one is www. and one isn't

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by MrTech » Thu May 17, 2012 10:58 pm

I was using Link Sleuth as well and all it did was show me how much extra work I have ahead of me fixing all the errors it found. However, when I check a page at random, it still doesn't show as cached. Just for good measure, I re-installed it just now, tried again and same results, no cache is created.

My www gets redirected directly to domain.com so when I check www.domain.com it does nothing, but if I check domain.com it works as expected, but again, none of the pages get cached which is too bad because this is an easy tool to use and it's free. Are you sure Link Sleuth works, you have actually checked the source of the page and seen the cached times show up?

~
Install Extensions OR OpenCart Fast Service! PayPal Accepted
I will professionally install and configure any free or purchased theme, module or extension.

Visit http://www.mrtech.ca if you need an OpenCart webmaster
~


User avatar
Active Member

Posts

Joined
Mon Jan 09, 2012 2:39 pm
Location - Canada, Eh!

Post by Ampeter » Thu May 17, 2012 11:04 pm

JAY6390 wrote:I see. They should be identical unless one's using seo urls, and the other isn't. Or one is using a different domain, ie one is www. and one isn't
That's why I ask if there's a way of extracting the url from the file name (cache.ea2354f2lololol321etcetc -> http://www.mypage.com), as far as I can tell when I tell link sleuth to use http://www.mypage.com and when I access it via the browser it should be the same url but two cache files are created so there must be a difference somewhere! :S


MrTech wrote:I was using Link Sleuth as well and all it did was show me how much extra work I have ahead of me fixing all the errors it found. However, when I check a page at random, it still doesn't show as cached. Just for good measure, I re-installed it just now, tried again and same results, no cache is created.

My www gets redirected directly to domain.com so when I check http://www.domain.com it does nothing, but if I check domain.com it works as expected, but again, none of the pages get cached which is too bad because this is an easy tool to use and it's free. Are you sure Link Sleuth works, you have actually checked the source of the page and seen the cached times show up?
The first time I used it no cache files were generated, today I tried setting maximum depth at 0 and checked a single url and a cache file was created BUT apparently not with the same url you would get using a browser.

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by teratyke » Thu May 17, 2012 11:12 pm

I've got no visitors on my site a the moment :-[

I cleared the cache from the admin
Checked a specific url l looked at source - not cached.
re Checked the url l looked at source - cached - as you would expect.


I cleared the cache from the admin
ran link sleuth on that url
checked the url and source in a browser - it was cached.

That suggests it is working for me using link sleuth to build the cache.

I have noticed, and I can't quite put my finger on the problem, some inconsistencies as to when a cached page is loaded or not - for example it sometimes appears the cache is not working (in chrome) but if I switch over to Firefox all looks good -switch back to chrome and things seem to work - I know that doesn't make sense and I can't back it up with any evidence, but maybe it relates somehow.

A url is a url is a url regardless of browser or crawler, isn't it?

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by JAY6390 » Thu May 17, 2012 11:16 pm

Open

Code: Select all

/vqmod/xml/caching.xml
Find

Code: Select all

                        $output .= '
<!-- WITHOUT CACHE: ' . $timer->stop() . ' -->'; 
change it to

Code: Select all

                        $output .= '
<!-- WITHOUT CACHE: ' . $timer->stop() . ' -->
<!-- KEY: ' . REQUEST_KEY . ' -->'; 
Then clear cache and when you next run it, it will add the key on each page

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Ampeter » Thu May 17, 2012 11:55 pm

teratyke wrote: I cleared the cache from the admin
ran link sleuth on that url
checked the url and source in a browser - it was cached.
Are you using seo urls? I'm trying to think what could I be doing wrong :(

JAY6390 wrote:Open

Code: Select all

/vqmod/xml/caching.xml
Find

Code: Select all

                        $output .= '
<!-- WITHOUT CACHE: ' . $timer->stop() . ' -->';  
change it to

Code: Select all

                        $output .= '
<!-- WITHOUT CACHE: ' . $timer->stop() . ' -->
<!-- KEY: ' . REQUEST_KEY . ' -->';  
Then clear cache and when you next run it, it will add the key on each page
Is there a way to go from key->url? Checking the key from the source doesnt help as I can't access the cached pages created by the crawler as I don't know their urls! :D

Thanks anyways.

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by JAY6390 » Fri May 18, 2012 12:05 am

The key is essentially a hash of a number of parameters, so you can't reverse them unfortunately

Instead, what you can do is open

Code: Select all

/pagecache/caching.php
find

Code: Select all

define('REQUEST_KEY', $requestKey); 
at the bottom. After it, add

Code: Select all

define('REQUEST_KEY_FULL', $key); 
Then change the REQUEST_KEY in the previous post code to REQUEST_KEY_FULL. That will give you the exact data thats collected to generate the hash. Note that it will be visible to visitors too, so you'll need to remove it again once you've finished testing

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Ampeter » Fri May 18, 2012 12:16 am

That worked! finally! :D

The difference was in language/currency. Link Sleuth links were using "en/usd" but my store has another default language and uses euros.

Now to find a way to fix that, but at least I know where's the problem! :crazy:

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by JAY6390 » Fri May 18, 2012 12:22 am

You can set the default language pretty easily, you just need to open
/pagecache/caching.php and find

Code: Select all

$language = (empty($_SESSION['language']) || !is_string($_SESSION['language'])) ? 'en' : $_SESSION['language'];
changing the 'en' to your language
and changing

Code: Select all

$currency = (empty($_SESSION['currency']) || !is_string($_SESSION['currency'])) ? 'usd' : $_SESSION['currency'];
to have eur instead of usd

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Ampeter » Fri May 18, 2012 8:07 pm

JAY6390 wrote:You can set the default language pretty easily, you just need to open
/pagecache/caching.php and find

Code: Select all

$language = (empty($_SESSION['language']) || !is_string($_SESSION['language'])) ? 'en' : $_SESSION['language'];
changing the 'en' to your language
and changing

Code: Select all

$currency = (empty($_SESSION['currency']) || !is_string($_SESSION['currency'])) ? 'usd' : $_SESSION['currency'];
to have eur instead of usd

Yeah! that's what I ended up doing, should've checked the thread before wasting an hour trying different things :D Finally I can use a crawler to generate the cache!

Thanks for all the help! where can I sign up for your fan club? :joker:

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by JAY6390 » Fri May 18, 2012 8:09 pm

If you just get some pom poms and cheer "Jay Jay, he's the best" that will do for me :D

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by MrTech » Sat May 19, 2012 5:45 am

Ok so I'm following your discussion and trying to apply the changes but I still get the same results, no cache. I have English as default but CAD as the currency so I opened caching.php and changed line 149 $currency from 'usd' to 'cad'.

Cleared the cache, ran link sleuth again and still no cache shows up on the page?!? Should I apply the 'key' mods suggested above as well? What step did I miss?

~
Install Extensions OR OpenCart Fast Service! PayPal Accepted
I will professionally install and configure any free or purchased theme, module or extension.

Visit http://www.mrtech.ca if you need an OpenCart webmaster
~


User avatar
Active Member

Posts

Joined
Mon Jan 09, 2012 2:39 pm
Location - Canada, Eh!

Post by JAY6390 » Sat May 19, 2012 5:50 am

Hi MrTech

Apply the key mods above to see what the difference is in the keys being applied yes. That's the only way to know for sure what the difference is

Kind regards
Jay

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Ampeter » Sat May 19, 2012 4:53 pm

MrTech wrote:Ok so I'm following your discussion and trying to apply the changes but I still get the same results, no cache. I have English as default but CAD as the currency so I opened caching.php and changed line 149 $currency from 'usd' to 'cad'.

Cleared the cache, ran link sleuth again and still no cache shows up on the page?!? Should I apply the 'key' mods suggested above as well? What step did I miss?
Try this:

-Clear your pagecache/cachefiles folder

-Rename Xenu.ini to Xenu.ini.bak in your Link Sleuth folder (so a new one is created with default settings).

-Start Xenu.exe and set on options "Maximum depth" at 0.

-Click Control+n to check a new url. Dont forget to add the final "/"!! -> "www.yoursite.com/" Otherwise no cache will be generated using depth 0.

-Check your pagecache/cachefiles folder (from FTP! that's the only way to know for sure if any cache is being created at all)

That is what I was doing and it worked. Good luck! ;)


BTW: I found another more powerful link checker: http://linkchecker.sourceforge.net/

It also shows you the parent url (very useful!) and let's you use regex to limit searches, plus you can use the gui or run it automatically using the command line.

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by teratyke » Sat May 19, 2012 7:10 pm

Ampeter wrote: BTW: I found another more powerful link checker: http://linkchecker.sourceforge.net/
Thanks for that - looks excellent - command line too, so I should be able to schedule a cache rebuild during the night.


Jay, anyone,
Is there an explanation for this behaviour, or could someone confirm what I am seeing?
If I visit my site using chrome, I don't seem to get the cached version, if I use firefox I do.
Screen shot attached you can see the comments are not there in the chrome view-source.
It didn't do this before, but I can't see how the browser could effect this. It occurred to me that it is using the cache, but chrome is removing the comments from the bottom of the source, is that feasible?


(scroll right to view source)

Thanks
Rob
Last edited by teratyke on Sat May 19, 2012 7:37 pm, edited 1 time in total.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by JAY6390 » Sat May 19, 2012 7:13 pm

Hi Rob

That will be the 70 items in your shopping basket ;)
There's no caching if items are in your basket or you are logged in as a customer

Kind regards
Jay

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by teratyke » Sat May 19, 2012 7:18 pm

oh yeah. :-[ Clearly I need more coffee and not try to do any work at a weekend. :drunk:
Such a clever mod.

Active Member

Posts

Joined
Sun Jun 12, 2011 3:05 pm

Post by JAY6390 » Sat May 19, 2012 7:20 pm

haha agree, go put your feet up :)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 86 guests