How many of you people are using SearchCache plug in? Do you think it works well or does it actually slows your site down? Any feedback is appreciated!
Mar 26, 2003, 12:37 AM
Enthusiast (809 posts)
Mar 26, 2003, 12:37 AM
Post #3 of 20
Views: 12692
Hi,
It was created to cache the search results to speed up the search. If your Links data is "big", you can see the performace. Otherwise, it is not much diffirent
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
It was created to cache the search results to speed up the search. If your Links data is "big", you can see the performace. Otherwise, it is not much diffirent
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
Mar 26, 2003, 8:14 PM
Enthusiast (671 posts)
Mar 26, 2003, 8:14 PM
Post #4 of 20
Views: 12688
I have 200,000 links in - but did not see any difference. I am using MYSQL4 which does the caching anyway - so perhaps that explains it...
Klaus
http://www.ameinfo.com
Klaus
http://www.ameinfo.com
Mar 26, 2003, 8:40 PM
Enthusiast (809 posts)
Mar 26, 2003, 8:40 PM
Post #5 of 20
Views: 12665
Ok. In this case, do you think caching one sql statement results is better than two/more? I mean If the CacheSearch query statement cached, it is faster too
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
Feb 15, 2008, 1:43 AM
Veteran / Moderator (18441 posts)
Feb 15, 2008, 1:43 AM
Post #6 of 20
Views: 12519
Hi,
Is this plugin meant to work on GLinks 3.2? I'm trying it on a large DB (5 million links), but I don't see any data getting put into the SearchCache table - so I'm guessing its not working?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Is this plugin meant to work on GLinks 3.2? I'm trying it on a large DB (5 million links), but I don't see any data getting put into the SearchCache table - so I'm guessing its not working?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 15, 2008, 5:18 AM
Enthusiast (809 posts)
Feb 15, 2008, 5:18 AM
Post #7 of 20
Views: 12450
Hi Andy,
It is very old since I first submit to there. I did not updated it for latest glinks verions and don't know how to update that.
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
It is very old since I first submit to there. I did not updated it for latest glinks verions and don't know how to update that.
Cheers,
Cheers,
Dat
Programming and creating plugins and templates
Blog
Feb 15, 2008, 5:42 AM
Veteran / Moderator (18441 posts)
Feb 15, 2008, 5:42 AM
Post #8 of 20
Views: 12479
Hi,
Ok =)
I'll have a look at writing one myself, as it doesn't seem to work on the new version, and its a feature I need :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Ok =)
I'll have a look at writing one myself, as it doesn't seem to work on the new version, and its a feature I need :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 15, 2008, 8:11 AM
Veteran / Moderator (18441 posts)
Feb 15, 2008, 8:11 AM
Post #9 of 20
Views: 12472
Hi,
I'm getting there with fixing up your version.
The problem I'm having, is getting the values out of links_results_loop.
I've tried loads of stuff - but I'm not really 100% sure what format its actually in :/
doing a Dumper($args->{links_result_loop}) .. gives what I would expect ...i.e:
{
..values for link 1
},
{
..values for link 2
},
{
..values for link 3
}
]
.. but the way I'm thinking its gonna have to work - is by doing something like:
1) Loop through links_results_loop - getting the links ID number, and saving them like 1,2,3,4,5 into the link_results field.
2) The, in query_cache(), get it to grab the Link ID's from the link_result table - and get each of the results (this is still gonna be a hell of a lot quicker than doing full searches for repeat queries).
The problem as I said - is I can't work out the syntax of getting out the values of the hashref's inside $args->{links_result_loop}
BTW - the reason it wasn't adding the entries into the SearchCache table was because the "keyword" field was blank - $ENV{QUERY_STRING} was returning nothing, so I'm using this now to get the query string:
my @input;
foreach my $key ($IN->param()) {
my $value = $IN->param($key);
push @input, "$key=$value";
}
return join("&",@input);
}
..and that seems to be working a treat
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I'm getting there with fixing up your version.
The problem I'm having, is getting the values out of links_results_loop.
I've tried loads of stuff - but I'm not really 100% sure what format its actually in :/
doing a Dumper($args->{links_result_loop}) .. gives what I would expect ...i.e:
Code:
$VAR1 = [ {
..values for link 1
},
{
..values for link 2
},
{
..values for link 3
}
]
.. but the way I'm thinking its gonna have to work - is by doing something like:
1) Loop through links_results_loop - getting the links ID number, and saving them like 1,2,3,4,5 into the link_results field.
2) The, in query_cache(), get it to grab the Link ID's from the link_result table - and get each of the results (this is still gonna be a hell of a lot quicker than doing full searches for repeat queries).
The problem as I said - is I can't work out the syntax of getting out the values of the hashref's inside $args->{links_result_loop}
BTW - the reason it wasn't adding the entries into the SearchCache table was because the "keyword" field was blank - $ENV{QUERY_STRING} was returning nothing, so I'm using this now to get the query string:
Code:
sub get_values { my @input;
foreach my $key ($IN->param()) {
my $value = $IN->param($key);
push @input, "$key=$value";
}
return join("&",@input);
}
..and that seems to be working a treat
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 18, 2008, 4:25 AM
Veteran / Moderator (18441 posts)
Feb 18, 2008, 4:25 AM
Post #11 of 20
Views: 12427
Hi,
I've finally managed to rewrite this =)
There are a couple of functions that were in your original version;
timeout()
build_reset_cache()
.. but the rest I've had to rewrite - as the way you were doing it, wasn't being liked in GLinks. I've also added some documentation, as it requires a couple of template changes (only 2)
The main reason it wasn't working, was that you were simply writing the results from <%links%> - which isn't supported in GLinks. The same with the category results - you had to actually store the category_results_loop, instead of just HTML. Its taken about 8 hours to get this far, but hopefully it'll all work fine for other users (seems to be running fine on my install of 4.5 million links)
Also , the "paging" bit was quite hard - as thats not returned as just text - so I had to use a bit of initiative on that one =)
Anyway, heres the new version.
Seeing as you wrote the original, I've left it with the same name - and given you create in the install / readme etc
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I've finally managed to rewrite this =)
There are a couple of functions that were in your original version;
Code:
reset_cache() timeout()
build_reset_cache()
.. but the rest I've had to rewrite - as the way you were doing it, wasn't being liked in GLinks. I've also added some documentation, as it requires a couple of template changes (only 2)
The main reason it wasn't working, was that you were simply writing the results from <%links%> - which isn't supported in GLinks. The same with the category results - you had to actually store the category_results_loop, instead of just HTML. Its taken about 8 hours to get this far, but hopefully it'll all work fine for other users (seems to be running fine on my install of 4.5 million links)
Also , the "paging" bit was quite hard - as thats not returned as just text - so I had to use a bit of initiative on that one =)
Anyway, heres the new version.
Seeing as you wrote the original, I've left it with the same name - and given you create in the install / readme etc
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Feb 19, 2008, 2:37 AM
Veteran / Moderator (18441 posts)
Feb 19, 2008, 2:37 AM
Post #13 of 20
Views: 12405
Hi,
I've uploaded the new version onto our site:
http://www.ultranerds.com/...ns/SearchCache_L230/. The version in the GLinks Plugin Download area (i.e in your admin panels) will still be the old version by Dat, so that won't work with GLinks
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I've uploaded the new version onto our site:
http://www.ultranerds.com/...ns/SearchCache_L230/. The version in the GLinks Plugin Download area (i.e in your admin panels) will still be the old version by Dat, so that won't work with GLinks
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 11, 2008, 9:40 AM
Veteran / Moderator (18441 posts)
Apr 11, 2008, 9:40 AM
Post #15 of 20
Views: 12427
Hi,
No problem =)
In /admin/Plugins/SearchCache.pm, find:
.. and add this line before it:
That should work :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote:
Thx a lot to have upgraded this nice pluginNo problem =)
In /admin/Plugins/SearchCache.pm, find:
Code:
push @links, $hit;.. and add this line before it:
Code:
$hit->{detailed_url} = $CFG->{build_root_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );That should work :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 11, 2008, 9:52 AM
Novice (10 posts)
Apr 11, 2008, 9:52 AM
Post #16 of 20
Views: 12362
very fast reply
it's working good with
$hit->{detailed_url} = $CFG->{build_detail_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );
another little error the tag
disappeared
There's no error but the text you are here -> "Search results"
doesn't display
thx
it's working good with
Code:
$hit->{detailed_url} = $CFG->{build_detail_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );
another little error the tag
Code:
<%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%>disappeared
There's no error but the text you are here -> "Search results"
doesn't display
thx
Apr 14, 2008, 5:03 AM
Veteran / Moderator (18441 posts)
Apr 14, 2008, 5:03 AM
Post #17 of 20
Views: 12344
Hi,
Code:
<%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%>
disappeared
There's no error but the text you are here -> "Search results"
Try editing /admin/Plugins/SearchCache.pm, find:
link_results_loop => \@links,
%$results,
dont_reprocess => 1
} );
..and change to:
push @crumb, { Name => "Home", URL => qq|$CFG->{build_root_url}| };
push @crumb, { Name => "Search", URL => qq|$CFG->{db_cgi_url}/search.cgi| };
push @crumb, { Name => "Results", URL => qq|$CFG->{db_cgi_url}/search.cgi| }; # no need passing the keyword, as the last bit isn't ever shown =)
print Links::SiteHTML::display('search_results', {
link_results_loop => \@links,
%$results,
main_title_loop => \@crumb,
dont_reprocess => 1
} );
That should fix the problem :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote:
another little error the tag Code:
<%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%>
disappeared
There's no error but the text you are here -> "Search results"
Try editing /admin/Plugins/SearchCache.pm, find:
Code:
print Links::SiteHTML::display('search_results', { link_results_loop => \@links,
%$results,
dont_reprocess => 1
} );
..and change to:
Code:
my @crumb; push @crumb, { Name => "Home", URL => qq|$CFG->{build_root_url}| };
push @crumb, { Name => "Search", URL => qq|$CFG->{db_cgi_url}/search.cgi| };
push @crumb, { Name => "Results", URL => qq|$CFG->{db_cgi_url}/search.cgi| }; # no need passing the keyword, as the last bit isn't ever shown =)
print Links::SiteHTML::display('search_results', {
link_results_loop => \@links,
%$results,
main_title_loop => \@crumb,
dont_reprocess => 1
} );
That should fix the problem :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 14, 2008, 6:22 AM
Veteran / Moderator (18441 posts)
Apr 14, 2008, 6:22 AM
Post #18 of 20
Views: 12370
Hi,
I've just uploaded version 2.1.
http://www.ultranerds.com/...ns/SearchCache_L230/
This includes:
1) The detailed_url bug fix
2) The breadcrumb fix
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I've just uploaded version 2.1.
http://www.ultranerds.com/...ns/SearchCache_L230/
This includes:
1) The detailed_url bug fix
2) The breadcrumb fix
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
May 18, 2010, 3:26 AM
Veteran / Moderator (18441 posts)
May 18, 2010, 3:26 AM
Post #20 of 20
Views: 11944
Hi,
Not sure I understand? The plugin should only put a new value into the SearchCache table if one doesn't exist for that query. The table should get cleaned out after the xx timescale (the "timeout") ... so there should only ever be one entry in there per search phrase?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Not sure I understand? The plugin should only put a new value into the SearchCache table if one doesn't exist for that query. The table should get cleaned out after the xx timescale (the "timeout") ... so there should only ever be one entry in there per search phrase?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!