We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43505
    • 2 Posts
    Hi,

    We have a quite big site running MODX (10.000 resources). We are using the modx->makeUrl function to generate internal links across the site, but it seems that this is taking up a lot resources to connect to the db to get the resources' alias. We have disabled the cache_alias_map setting to prevent the resource cache becoming too big.

    Our idea to improve it was to create a small overlaying method to save the url in cache with the id as reference for easy retrieving next time, and then call this method instead of modx->makeUrl.

    Would that be a good idea or do you have experience in improving this any other way?
      • 38415 ☆ A M B ☆
      • 70 Posts
      I'm not sure, but maybe this PR helps also https://github.com/modxcms/revolution/pull/12173 ?
        chsmedien - Digital Marketing Agency
        MODX Professional & Ambassador

        http://chsmedien.com | http://twitter.com/christianseel
        • 22303 MODX Staff
        • 10,725 Posts
        Perhaps there is some confusion. It won't hit the db if you do not disable cache_alias_map. If you do disable that, you are forcing it to hit the db rather than create a cache of all the URI's in your site. It's a trade-off. In either case, this overhead should only occur on first generation of the pages. Once they are cached, there is no longer an issue.
          • 43505
          • 2 Posts
          Thanks for the answers.

          Quote from: opengeek at Dec 02, 2014, 07:32 AM
          Perhaps there is some confusion. It won't hit the db if you do not disable cache_alias_map. If you do disable that, you are forcing it to hit the db rather than create a cache of all the URI's in your site. It's a trade-off. In either case, this overhead should only occur on first generation of the pages. Once they are cached, there is no longer an issue.

          Okay, so on our site with 10.000 resources divided in 10 different contexts, would you recommend enabling cache_alias_map?