# Memcached Management
Through Telnet or Netcat (nc), you can efficiently manage data in Memcached. Here are some common Memcached operations:
# Connect to Memcached Service
Ensure you have installed ServBay's command-line tools. Refer to the Command-Line Support documentation for detailed installation steps.
Connect to the local Memcached service:
# Connect to the local Memcached service using Telnet
telnet localhost 11211
1
2
2
Or use nc
(netcat):
# Connect to the local Memcached service using nc
nc localhost 11211
1
2
2
- View Memcached Status
View status information of the Memcached service:
# View status
stats
1
2
2
- Add Key-Value Pair
Add a key-value pair to the Memcached service:
# Add a key-value pair
set my_key 0 0 10
my_value
1
2
3
2
3
- Retrieve Key-Value Pair
Retrieve a key-value pair from the Memcached service:
# Retrieve a key-value pair
get my_key
1
2
2
- Delete Key-Value Pair
Delete a key-value pair from the Memcached service:
# Delete a key-value pair
delete my_key
1
2
2
- Flush All Data
Clear all data from the Memcached service:
# Flush all data
flush_all
1
2
2
# Additional Operations
Refer to the Memcached Official Command List (opens new window) for more Memcached command information.