Javatpoint Logo
Javatpoint Logo

Memcached - Get Data

Memcached get command is used to retrieve the value stored at key. This command takes one or more keys and returns all found items. If the key does not exist in Memcached, then it will return nothing.



key: It is the key data stored and retrieved from Memcached.

Example in Ubuntu

Let's see an example for "get" command. Here, we will use 'city' as the key and store 'bangalore' in it with expiration of time 900 seconds.

Memcached - Get Data

Example in Windows:

Let's see an example for "get" command. Here we will use 'city' as the key and store 'bangalore' in it with the expiration of time is 900 seconds.

Memcached Server:

Memcached - Get Data

Memcached Client

Memcached - Get Data

Get data using Java Application

Consider that Memcached server is running on host port 11211. Here, we will use get() method to get data in Memcached server.



Connection to server successfully
set status: true
Get from Cache:bangalorebangalore

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA