Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Distributed Cache Service/ Service Overview/ Command Compatibility/ Commands Supported and Disabled by DCS for Memcached (Discontinued)

Commands Supported and Disabled by DCS for Memcached (Discontinued)

Updated on 2023-08-21 GMT+08:00
NOTE:

DCS for Memcached is no longer provided. You can use DCS Redis instances instead.

Memcached supports the TCP-based text protocol and binary protocol. Any clients compatible with a Memcached protocol can access DCS instances.

Memcached Text Protocol

The Memcached text protocol uses ASCII text to transfer commands, helping you compile clients and debug problems. DCS Memcached instances can even be directly connected using Telnet.

Compared with the Memcached binary protocol, the Memcached text protocol is compatible with more open-source clients, but the text protocol does not support authentication.

NOTE:

Clients can use the Memcached text protocol to access DCS Memcached instances only if password-free access is enabled. Password-free access means that access to DCS Memcached instances will not be username- and password-protected, and any Memcached clients that satisfy security group rules in the same VPC can access the instances. Enabling password-free access poses security risks. Exercise caution when enabling password-free access.

Table 1 lists the commands supported by the Memcached text protocol and describes whether these commands are supported by DCS Memcached instances.

Table 1 Commands supported by the Memcached text protocol

Command

Description

Supported by DCS

add

Adds data.

Yes

set

Sets data, including adding or modifying data.

Yes

replace

Replaces data.

Yes

append

Adds data after the value of the specified key.

Yes

prepend

Adds data before the value of a specified key.

Yes

cas

Checks and set data.

Yes

get

Queries data.

Yes

gets

Queries data details.

Yes

delete

Deletes data.

Yes

incr

Adds the specified amount to the requested counter.

Yes

decr

Removes the specified amount to the requested counter.

Yes

touch

Updates the expiration time of existing data.

Yes

quit

Closes the connection.

Yes

flush_all

Invalidates all existing data.

NOTE:

The value of the delay option (if any) must be 0.

Yes

version

Queries Memcached version information.

Yes

stats

Manages operation statistics.

NOTE:

Currently, only basic statistics can be queried. Commands on optional parameters cannot be queried.

Yes

cache_memlimit

Adjusts the cache memory limit.

No

slabs

Queries usage of internal storage structures.

No

lru

Manages policies of deleting expired data.

No

lru_crawler

Manages threads of deleting expired data.

No

verbosity

Sets the verbosity level of the logging output.

No

watch

Inspects what's going on internally.

No

Memcached Binary Protocol

The Memcached binary protocol encodes commands and operations into specific structures before sending them. Commands are represented by predefined character strings.

The Memcached binary protocol provides more features but fewer clients than the Memcached text protocol. The Memcached binary protocol is more secure than the Memcached text protocol as it additionally supports simple authentication and security layer (SASL) authentication.

Table 2 lists the commands supported by the Memcached binary protocol and describes whether these commands are supported by DCS Memcached instances.

Table 2 Commands supported by the Memcached binary protocol

Command Code

Command

Description

Supported by DCS

0x00

GET

Queries data.

Yes

0x01

SET

Sets data, including adding or modifying data.

Yes

0x02

ADD

Adds data.

Yes

0x03

REPLACE

Replaces data.

Yes

0x04

DELETE

Deletes data.

Yes

0x05

INCREMENT

Adds the specified amount to the requested counter.

Yes

0x06

DECREMENT

Removes the specified amount to the requested counter.

Yes

0x07

QUIT

Closes the connection.

Yes

0x08

FLUSH

Invalidates all existing data.

NOTE:

The value of the delay option (if any) must be 0.

Yes

0x09

GETQ

Queries data. The client will not receive any response in case of failure.

Yes

0x0a

NOOP

No-operation instruction, equivalent to ping.

Yes

0x0b

VERSION

Queries Memcached version information.

Yes

0x0c

GETK

Queries data and adds a key into the response packet.

Yes

0x0d

GETKQ

Queries data and returns a key. The client will not receive any response in case of failure.

Yes

0x0e

APPEND

Adds data after the value of the specified key.

Yes

0x0f

PREPEND

Adds data before the value of a specified key.

Yes

0x10

STAT

Queries statistics of DCS Memcached instances.

NOTE:

Currently, only basic statistics can be queried. Commands on optional parameters cannot be queried.

Yes

0x11

SETQ

Sets data, including adding or modifying data.

The SETQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x12

ADDQ

Adds data.

Unlike the ADD command, the ADDQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x13

REPLACEQ

Replaces data.

Unlike the REPLACE command, the REPLACEQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x14

DELETEQ

Deletes data.

Unlike the DELETE command, the DELETEQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x15

INCREMENTQ

Adds the specified amount to the requested counter.

Unlike the INCREMENT command, the INCREMENTQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x16

DECREMENTQ

Removes the specified amount to the requested counter.

Unlike the DECREMENT command, the DECREMENTQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x17

QUITQ

Closes the connection.

Yes

0x18

FLUSHQ

Clears data and returns no information.

NOTE:

The value of the delay option (if any) must be 0.

Yes

0x19

APPENDQ

Adds data after the value of the specified key.

Unlike the APPEND command, the APPENDQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x1a

PREPENDQ

Adds data before the value of a specified key.

Unlike the PREPEND command, the PREPENDQ command only returns a response on failures. The client will not receive any response in the case of success.

Yes

0x1c

TOUCH

Updates the expiration time of existing data.

Yes

0x1d

GAT

Queries data and updates the expiration time of existing data.

Yes

0x1e

GATQ

Queries data and returns a key. The client will not receive any response in case of failure.

Yes

0x23

GATK

Queries data, adds a key into the response packet, and updates the expiration time of existing data.

Yes

0x24

GATKQ

Queries data, returns a key, and updates the expiration time of existing data. The client will not receive any response in case of failure.

Yes

0x20

SASL_LIST_MECHS

Asks the server what SASL authentication mechanisms it supports.

Yes

0x21

SASL_AUTH

Starts SASL authentication.

Yes

0x22

SASL_STEP

Further authentication steps are required.

Yes

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback