We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2489
    • 1 Posts
    I see that the new version of MODX supports memcached server. How exactly do we do this? is there a config file that we need to specify the ip, etc?
    • Quote from: avi123 at Mar 10, 2010, 07:42 PM

      I see that the new version of MODX supports memcached server. How exactly do we do this? is there a config file that we need to specify the ip, etc?
      There are system (or context) settings that you can use to set this up, but I need to detail these in some documentation for everyone. This is toward the top of my list of things I need do other than get RC1 released and it will be soon.

      If I don’t reply back before the weekend, post back and make sure I do provide the documentation on this as it is a critical feature I want to advertise.
        • 27611
        • 2 Posts
        anything else? wink
        • You might read: http://modxcms.com/forums/index.php/topic,24645.0.html for some background.

          I am putting together a tutorial, but there are a lot of options and scenarios to cover. To get you started in the meantime, you can configure Partial Resource Caching for a memcached instance by adding the following System Settings:

          cache_resource_key "resourceCache"
          cache_resource_handler "cache.xPDOMemCache"
          resourceCache_memcached_server "localhost:11211"


          Or similarly, if you wanted to cache System Settings and Context Settings together in a specific set of memcached instances:

          cache_system_settings_key "settingsCache"
          cache_context_settings_key "settingsCache"
          settingsCache_cache_handler "cache.xPDOMemCache"
          settingsCache_memcached_server "localhost:11212;localhost:11213"

          NOTE: for all the settings you can use the area lexicon key of "caching" and "core" namespace so they show up with the rest of the Caching-related settings.
            • 15083
            • 697 Posts
            This is quite an old post. Is this info still upto date.
            I'm working with memcache and did the following:
            cache_handler = "xPDOMemCache"
            resourceCache_memcached_server = "localhost:11211"

            Is this all I need to do to cache resourcesd to memcache?
              • 15083
              • 697 Posts
              Im getting this error:
              Could not load class: xPDOMemCache from xpdomemcache.

              Obviously the cache is not getting written to memcache!
                • 15083
                • 697 Posts
                Ok got a little further, did not read the post fully!
                It appears our server does not have memcache, but appears to have "memcached" extension.
                Is there a way for MODx to work with this extension based on the setting I added above?
                • The xPDO implementation includes support for the memcache PHP extension, not the memcached extension. But you should be able to author a version using the memcached API by following the existing memcache implementation.
                    • 15083
                    • 697 Posts
                    Hi there,

                    I did.
                    Changes were very easy. I just commented out the 4th param of the get/set, and added the d!!!!!
                    They are quite similar!

                    J
                      • 28780
                      • 16 Posts
                      I'm using the latest version of MODX revolution 2.2.0pl and I'd like to implement memcache.
                      I've tried adding the following system settings however when I look at my memcache stats I don't see any connection being made.

                      These are the settings I made:
                      cache_handler = "xPDOMemCache"
                      cache_resource_key = "resourceCache"
                      resourceCache_memcached_server = "localhost:11211"

                      Do I need to edit any files or anything? I've already tested that memcache works via a separate secript.