All HowTo's

Install Memcached on OpenShift

Because gears don’t share memory, the only way to handle sessions in a scalable application is to use a database. Or, you can use memcached which is simple enough to do but it will consume another gear in a scalable application.

Using the “rhc” command, we can add the memcahced cartridge to the application (in this case) TestApp.

rhc cartridge add --app TestApp

The two environment variable that you might be interested in are:

OPENSHIFT_MEMCACHED_HOST      The Memcached IP address
OPENSHIFT_MEMCACHED_PORT      The Memcached port

Leave a Reply

Your email address will not be published. Required fields are marked *