Results 1 to 11 of 11

Thread: Cached Searches

  1. #1
    Senior Member Beorn is on a distinguished road Beorn's Avatar
    Join Date
    May 2002
    Location
    LI, NY
    Age
    22
    Posts
    453

    Cached Searches

    Perhaps a feature could be added so that it checks for a cached search. I.e. I search for .htaccess. Then, I hit back a few times, check something, then hit forward a few times. My browser tries to reload () the search page, but I'm confronted with the 20 second restricition notice. Could the DB be queried for the same query?
    --<Mike>--
     

  2. #2
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,676
    Blog Entries
    1
    Actually it does something like that. However you can still only perform a search every 20 seconds on this forum. The delay is configurable by the admin though.
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.
     

  3. #3
    Senior Member dzeanah has disabled reputation dzeanah's Avatar
    Join Date
    Dec 2002
    Posts
    124
    Newer versions of MySQL do that anyway -- queries that are identical to cached queries are answered from cached data.

    Works well. No need to duplicate the effort.
     

  4. #4
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    Quote Originally Posted by dzeanah
    Newer versions of MySQL do that anyway -- queries that are identical to cached queries are answered from cached data.

    Works well. No need to duplicate the effort.
    The vBulletin search caching system is rather more advanced than simply checking to see if the MySQL query is the same...
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  5. #5
    Senior Member dzeanah has disabled reputation dzeanah's Avatar
    Join Date
    Dec 2002
    Posts
    124
    Quote Originally Posted by Kier
    The vBulletin search caching system is rather more advanced than simply checking to see if the MySQL query is the same...
    That's fine. But it does represent additional complexity in the vB program, and I wonder how much additional performance it offers over the solution that's "free" in terms of vB's development cost.

    In my experience, a "stock" MySQL 4 installation sees 45% of queries as duplicates and returns results from the query cache (that's on a machine that sees about 55 million queries per week). How much more are the vB developers going to be able to reduce the number of queries that actually hit a disk? How many man-hours will it take to implement <-> test <-> refine the caching algorithms?

    It could very well be worth the effort; I'm inclined to say "leave it to the application you run on top of -- odds are the MySQL folks have already done a very good job."
     

  6. #6
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    Seeing as MySQL 4 is not even out of gamma yet, I don't really see how this helps anyone.

    Rest assured, there are good reasons why we have our own caching mechanism, and seeing as it's already been written this is a moot point anyway.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  7. #7
    Senior Member dzeanah has disabled reputation dzeanah's Avatar
    Join Date
    Dec 2002
    Posts
    124
    Quote Originally Posted by Kier
    Seeing as MySQL 4 is not even out of gamma yet, I don't really see how this helps anyone.
    Well, I was kind of figuring on an as-yet undefined release date for vB. Leaves plenty of time for MySQL 4 to make it all the way to stable.

    Rest assured, there are good reasons why we have our own caching mechanism, and seeing as it's already been written this is a moot point anyway.
    I'm curious. Can you share some of the thinking on that? Are you finding it difficult to optimize? (Really just a curiosity thing -- would love a PM if it's not appropriate here...)
     

  8. #8
    Former Lead Developer, vBulletin Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier is a jewel in the rough Kier's Avatar
    Join Date
    Sep 2000
    Location
    Reading, UK
    Posts
    8,228
    Blog Entries
    6
    1. Simply making a call to MySQL via PHP takes processing time, whether the result is pulled from MySQL's cache, or if it has to be queried fresh from the database.
    2. The search system executes several queries and we certainly wouldn't want to have to re-do all those queries just to switch from page 1 to page 2 of the search results.
    3. Using MySQL's cache wouldn't all us to do things like re-ordering the returned results without several trips to the database, or searching within search results.
    Those are just a few of the reasons that come to mind immediately.
    Meh. | Twitter: @KierDarby | Web: KierDarby.com
     

  9. #9
    Senior Member dzeanah has disabled reputation dzeanah's Avatar
    Join Date
    Dec 2002
    Posts
    124
    Ah. That makes more sense -- instead of duplicating the functionality, you're doing the work with the highest return in vB itself -- sort of like a L1 cache vs L2 on a CPU.
     

  10. #10
    Senior Member Beorn is on a distinguished road Beorn's Avatar
    Join Date
    May 2002
    Location
    LI, NY
    Age
    22
    Posts
    453
    But none of this solves the problem of if you hit back a few times and foward a few times, you can't view the search results without waiting 20 seconds...
    --<Mike>--
     

  11. #11
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,676
    Blog Entries
    1
    That really has nothing to do with cached searches. It is a check before vBulletin even looks for a cached search... Maybe this is something the developers can look at when their plate opens a little more.
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.
     

Similar Threads

  1. Images not being cached?
    By Blind Fool in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 26
    Last Post: Thu 8th Jan '04, 1:56pm
  2. Cached Post Lifeline On/Off
    By Lexserv in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 1
    Last Post: Fri 15th Aug '03, 9:23pm
  3. Forum cached
    By sebastian406 in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 0
    Last Post: Thu 10th Jul '03, 3:30pm
  4. Is this a cached page?
    By vBR in forum PHP & HTML Questions
    Replies: 7
    Last Post: Mon 6th Jan '03, 5:27am
  5. Important! Images cached?
    By PsychDrone in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 2
    Last Post: Sun 6th Jan '02, 8:23am

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts