Memorystore Memcached (beta)
Last updated
Was this helpful?
Last updated
Was this helpful?
Enabling this API may take a few minutes.
Memorystore Memcached requires Private Services Access to be enabled. See documentation for more information.
Reserve an IP address range to be used in a VPC, so that the Memcached instance's IP address can be allocated within this range:
Establish peering so that Memorystore can allocate the IP address in the reserved range in the VPC.
Create an instance and attach it to the default VPC.
Creating a Memcached instance may take a few minutes.
The IP address is not a static IP address. If you create the instance, the IP address may be different.
Computing Environment
Compute Engine
Kubernetes Engine
App Engine Flexible
App Engine Standard
Cloud Run
Cloud Function
You can test quickly by creating a Compute Engine instance in a zone within the same region:
SSH into the machine:
Install redis-cli
:
Connect to the instance:
You can try different Memcached commands, for example, stats
:
Spring Boot does not have a built-in Memcached support. However you can use a 3rd party Memcached starter to provide Spring Boot cache support, e.g.:
Add the 3rd party Memcached Spring Boot starter:
Configure the Memcached instance to connect to:
Turn on caching capability explicitly with the @EnableCaching
annotation:
Once you configured the Spring Boot with Redis and enabled caching, you can use the @Cacheable
annotation to cache return values.
See to see how to connect to a Memorystore instance from different computing environments.
See for more information.