Feeds:
RSS
Atom

Sometimes you may Opens external link in new windowwonder why performance of your site is less than expected. There can be many factors but one of them is your RealURL configuration.

There is an option named autoUpdatePathCache in tx_realurl_advanced. The idea behind this option is simple: it causes automatic update of path cache each time when page is accessed.

Normally entry in the path cache is created when user accesses a page or site map is viewed by user. Entry is added to cache and stays there until expires (also configurable). When it expires, it is deleted from cache and recreated next time when user goes to page or uses any other way to generate URL for this page.

The disadvantage of default behavior is simple: if you rename a page, it still will be in cache under old name and it will be used. Nothing more than that. Surely you can flush cache manually after renaming a page using Web>Info and Speaking URL management there.

But there is an option that may do it automatically. It is called autoUpdatePathCache. It updates path cache when user comes to cache. It changes path and expiration time. It does not update always but only if new path does not match existing path. However it always calculates new path and it means several other database queries.

So, if you have a web site with many visits and you want better performance, do not use autoUpdatePathCache option. Flush cache manually.

Like it? Then bookmark it! digg.comdel.icio.usgoogle.comMyLink.deYahooMyWebTechnoratiFurllive.comnetscapeTagThatWebnews

4 Comments

  1. on Thursday, 12-10-06 10:44 Michael Stucki
    Hi Dmitry,
    good to know. Is this covered in the manual yet?

    Anyway, I'm not satisfied with both solutions. There must be a better option. After all I wonder, why does RealURL need to monitor the tstamp?

    I'm just thinking if it would be possible to use a postProc-hook and clear/update the path cache whenever a page record is changed. Would that make sense?

    - michael
  2. on Thursday, 12-10-06 16:02 Dmitry
    No, these details are not in the manual yet. I think about having an optimization section there or even about expanding extension to analyze its own configuration and provide tips to optimize it.

    Hooks can be good but they are called on each modification. Extra performance problem. Though backend performance is less important than frontend. May be I need to look to hooks for this. Thanks for the idea!
  3. on Thursday, 12-10-06 19:16 Ingo
    yes, but you can simply check at the very beginning of the hook whether it was a change that requires realURL to take action, f.e. if the title, alias or navigation path has been changed...
  4. on Sunday, 15-10-06 19:26 Michael Stucki
    You could easily configure the hook to run _only_ when the changed record is in the "pages" table.

    After all I have no problem with a (very small!) performance slowdown for backend editors if the return of this is a boost for the visitors...

    - michael

Leave a Reply