Memcached¶
Memcached text-protocol mock handling get, set, delete, flush_all, stats, and quit. Keys support * wildcards and re: regex patterns.
protocols:
memcached:
enabled: true
port: 11211
mocks:
- id: session-cache
command: get
key: "session:*"
response:
value: '{"user_id":42,"role":"admin"}'
- id: any-delete
command: delete
key: "*"
response:
status: DELETED
See also¶
- Configuration — matching, templated responses, state conditions, and scenarios shared by every protocol
- Fault Injection — this protocol's fault fields:
error_type,message,delay,error_rate - Management API — mocks for this protocol follow the same CRUD pattern as HTTP mocks (
/api/mocks/{protocol})