We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    So I've started playing with memcached, even got it installed and working (I think) on my localhost MacBook. I'm still a little hazy on some of the details of how this thing works.

    Now, I've been given to understand that for busy sites one can use a separate installation of MDOX for all things Manager, using memcached. I think I have the general idea, but I do have a couple of questions.

    1. If you're doing all of your work on the dev Manager, exactly how does this stuff get into the prod database? Cron jobs to sync the databases during off-peak times? It doesn't get into the prod database, and is only in the prod memcached caches?

    2. I know that memcached servers can be set to use a remote server's memcached. I would presume that you would want the actual cached stuff, particularly resources, to be in the prod memcached caches. So how would one go about getting a newly created or edited resource on dev into the cache on prod? Would this be an automatic function of the dev memcached servers being set to the prod IP address? All one would need to do is explicitly put something in the cache with a plugin on publish or on save?

    This question has been answered by opengeek. See the first response.

      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
    • discuss.answer
      • 22303 MODX Staff
      • 10,725 Posts
      The only "separate" manager instances I've done were using the same core and a separate virtual host for the separate (sub-)domain OR a shared database server. In this way, the memcached caches are global.

      As for separate environments with separate databases, you would have to use a tool like teleport or cast to synchronize or push from one environment to another, and you would need isolated sets of memcached servers for each environment.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Of course! I was so fixated on the memcached issues that I completely forgot about the database server!
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org