Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

SEF urls , caching and db performance

  • 13-05-2007 04:33PM
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    hi

    im creating a website with lots of different components eg blog/groups/forums etc - all these will be custom components
    however i want all urls to be sef which i can do no problems and i can also cache the sef link creation process (which requires a db call every time the link is displayed)
    however my question is around performance - here are my two scenarios

    save all urls in one db and cache the call to that db - (problem here is even though its cached if the db grows to thounsands + thounsands of entries even the fact that the link construction call will be called for exampel once an hour) - might those calls be very very inefficient ??

    other option is how i have done it up until now- on calling the link creation function - call the related component table , for example call for the title for the related blog and create the url from that - this process only calls to the blog table which will not have thousands and thousands of entries


    question : would the performance on the first process really be that bad?


    tnx


Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    why do you have to do the catching? can you not just use .htaccess to rewrite url's?


  • Registered Users, Registered Users 2 Posts: 648 ✭✭✭ChicoMendez


    louie wrote:
    why do you have to do the catching? can you not just use .htaccess to rewrite url's?


    cos i want them fully sef friendly - ie if the title of the blog is 'I took my dog for a walk in dublin' then the url will be

    I_took_my_dog_for_a_walk_in_dublin.html

    not too sure htaccess can do that ???


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    that's exactly what you can do with rewrite url using .htacces

    have a look at this forum url:
    http://www.irishwebmasterforum.com/coding-help/1908-php-image-display-problem.html

    the tread is called "php images display problem"


  • Registered Users, Registered Users 2 Posts: 7,742 ✭✭✭mneylon


    Caching is a good idea, as it saves on server and DB load


  • Registered Users, Registered Users 2 Posts: 94 ✭✭Kudos


    blacknight wrote:
    Caching is a good idea, as it saves on server and DB load

    The way he plans it the server will choke once an hour.

    Concentrate on getting mod_rewrite working first. It sounds to me like the caching was just a happy side effect of your sef urls, if you still need it let us know.

    I use http://www.ilovejackdaniels.com/mod_rewrite_cheat_sheet.png on a regular basis.


  • Advertisement
Advertisement