Site Search Cache

youtalk

Regular Member
Joined
Jul 5, 2012
Messages
353
Reaction score
6
I had an idea, and I'm not sure how it would work.

I was thinking of having a site search cache created for my site. So whenever someone did a search on my site, that information would be stored in a cache.
Then what I was thinking, was to have this cached for G to see it. In the hopes this would drive G to go look at those pages, and in return increasing indexing.

Will it work?
How would it need to be done?
Etc..?

My site is ran off of PHP.
 
You could use memcache to do this, but I'm not sure why you think this will have an effect indexing. Google will see your server-side generated search results as long as it can find and crawl them (whether they are cached or not). In-memory caching is generally performed in order to reduce load on a database.

Basically:
1) User performs a search for "pizza".
2) PHP checks memcache to see if a key for "pizza" exists.
3) If key exists it's value is returned and outputted for the user. If key doesn't exist, database is queried, results are returned for user, and results are set in the cache for future searches.

Something to keep in mind when dealing with memcache in this sort of situation is that MySQL resource variables can't be cached, the data needs to be serialized. If your query returns more then one row, you'll probably need create a multi-demensional array from the data before it is set in memcache.
 
Last edited:
Hi youtalk

I am not sure if G is interested in the searches of your visitors - but what you want can easily be made - post your search.php - and I will help you...

cheers olystyle
 
You could use memcache to do this, but I'm not sure why you think this will have an effect indexing. Google will see your server-side generated search results as long as it can find and crawl them (whether they are cached or not). In-memory caching is generally performed in order to reduce load on a database.

You don't think G would look at the search cache as a good thing and want to know about the pages the users are searching for?
 
Back
Top