Answers.Body: <p>If this memcache cluster is purely for craft caching you could consider using redis instead.</p>
  
  <p>I've found both the old and newer memcache implementations in php to be flaky, but those are personal experiences without any scientific proofs backing them.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-20T22:20:20.453Z
Answers.LastActivityDate: 2017-10-20T22:20:20.453Z
Answers.UserDisplayName: Erik Weber
Body: <p>I'm trying to get our Craft CMS install to use a memcached cluster we created in AWS. I am able to telnet to the memcached server on port 11211 from the server that will be connecting to it. I did a tcpdump (packet trace) on the web server's interface and it did not try to connect to the caching server at all over a period of 12 hours.</p>
  
  <p>I have the caching method in config/general.php set to use "memcache" and have the useMemcached set to true in config/memcache.php as well as the memcached server info all filled out correctly. </p>
  
  <p>Is there something I am missing? It should have at least attempted to connect at least once in that amount of time. I was wondering if my web server was missing some sort of php plugin. I found libphp5-memcached wasn't installed so I installed it, but still no connection out. </p>
  
  <p>The documentation on getting Craft CMS to work with a caching server don't appear to have much more than the config stuff, so not sure what we're missing.</p>
  
  <p>Thanks for the help in advance!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T17:46:40.823Z
Comments.Text: Does your AWS box have memcache (older) or memcached (newer) installed? Are you trying to just store Craft generic data caches there and/or PHP sessions? What does your `host` parameter look like in your `memcache.php` config file?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T18:39:03.287Z
Comments.Text: Brad, it's memcached. The problem is I don't even see it try to connect so I don't think it's a version problem or anything like that. I'm not putting my host parameter here because it's the host of my memcached server. I assure you it's filled out and is the hostname of my memcached server in AWS and is able to be resolved. Like I said, I can telnet to it on port 11211 from the CLI just fine.
Comments.UserDisplayName: Robert Jerina
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T19:56:29.693Z
Comments.Text: Is your host name prefixed with `tcp://`?  For memcached, it shouldn't be (but it's required for memcache).
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T21:23:52.683Z
Comments.Text: Thanks, Brad. It is not prefixed with anything. It is just the hostname. Thanks again.
Comments.UserDisplayName: Robert Jerina
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-14T13:12:58.407Z
Comments.Text: I guess what I need to know is, what besides the config is needed to get memcached going? Anything else? I just want to make sure I'm not missing anything like certain packages that may be needed or something in the code I need to edit. It seems like it doesn't even connect out so it seems like there is a problem in Craft CMS somewhere whether it be config or otherwise.
Comments.UserDisplayName: Robert Jerina
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-15T02:25:54.210Z
Comments.Text: That should pretty much do it... are you getting files in `craft/storage/runtime/cache`?  If so, can you nuke, load the CP and see if they regenerate?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-19T18:39:51.860Z
Comments.Text: There were files in the cache directory. I nuked them all and one .spc file regenerated. Still not seeing any connections out on port 11211 though. Thanks.
Comments.UserDisplayName: Robert Jerina
Tags: <cache>
Title: How do you get memcached working?
ThreadText: # How do you get memcached working?
  
  (Asked by: username_0 on 2016-04-13)
  
  I'm trying to get our Craft CMS install to use a memcached cluster we created in AWS. I am able to telnet to the memcached server on port 11211 from the server that will be connecting to it. I did a tcpdump (packet trace) on the web server's interface and it did not try to connect to the caching server at all over a period of 12 hours.
  
  I have the caching method in config/general.php set to use "memcache" and have the useMemcached set to true in config/memcache.php as well as the memcached server info all filled out correctly.
  
  Is there something I am missing? It should have at least attempted to connect at least once in that amount of time. I was wondering if my web server was missing some sort of php plugin. I found libphp5-memcached wasn't installed so I installed it, but still no connection out.
  
  The documentation on getting Craft CMS to work with a caching server don't appear to have much more than the config stuff, so not sure what we're missing.
  
  Thanks for the help in advance!
  
  **Tags:** cache
  
  > **Comments:**
  > **username_1**: Does your AWS box have memcache (older) or memcached (newer) installed? Are you trying to just store Craft generic data caches there and/or PHP sessions? What does your `host` parameter look like in your `memcache.php` config file?  
  > **username_0**: username_1, it's memcached. The problem is I don't even see it try to connect so I don't think it's a version problem or anything like that. I'm not putting my host parameter here because it's the host of my memcached server. I assure you it's filled out and is the hostname of my memcached server in AWS and is able to be resolved. Like I said, I can telnet to it on port 11211 from the CLI just fine.  
  > **username_1**: Is your host name prefixed with `tcp://`?  For memcached, it shouldn't be (but it's required for memcache).  
  > **username_0**: Thanks, username_1. It is not prefixed with anything. It is just the hostname. Thanks again.  
  > **username_0**: I guess what I need to know is, what besides the config is needed to get memcached going? Anything else? I just want to make sure I'm not missing anything like certain packages that may be needed or something in the code I need to edit. It seems like it doesn't even connect out so it seems like there is a problem in Craft CMS somewhere whether it be config or otherwise.  
  > **username_1**: That should pretty much do it... are you getting files in `craft/storage/runtime/cache`?  If so, can you nuke, load the CP and see if they regenerate?  
  > **username_0**: There were files in the cache directory. I nuked them all and one .spc file regenerated. Still not seeing any connections out on port 11211 though. Thanks.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-10-20. Score: 2
  
  If this memcache cluster is purely for craft caching you could consider using redis instead.
  
  I've found both the old and newer memcache implementations in php to be flaky, but those are personal experiences without any scientific proofs backing them.
  
  
  ---
  
  