The NGinx Stack does not include Memcached. Neither the Memcached PHP Module.
You can install Memcached on Google Cloud as you would do it on any Debian/Ubuntu system:
sudo apt-get update
sudo apt-get install -y php5-memcached memcached
However, those commands won't install Memcached within the Nginx Stack directory. As you can check, the PHP module binary will be at installed at /usr/lib/php5/20131226/memcached.so and the Memcached configuration files under
Our Stacks include their own components. They don't use the System Packages. Therefore, we can't guarantee that the components included in the Stack will work as expected when using System Packages since they could be compiled with different flags, component versions, etc.
After installing Memcached as explained previously. You could add this line at the end of the PHP configuration file
Then restart NGINX and run the command below to check if the module was loaded:
sudo /opt/bitnami/ctlscript.sh restart nginx
php -m | grep memcached