mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-18 23:43:19 +08:00
35 lines
594 B
Markdown
35 lines
594 B
Markdown
To allow AR to be stored in redis we need a special Schema for it.
|
|
|
|
HSET prefix:className:primaryKey
|
|
|
|
|
|
http://redis.io/commands
|
|
|
|
Current Redis connection:
|
|
https://github.com/jamm/Memory
|
|
|
|
|
|
# Queries
|
|
|
|
wrap all these in transactions MULTI
|
|
|
|
## insert
|
|
|
|
SET all attribute key-value pairs
|
|
SET all relation key-value pairs
|
|
make sure to create back-relations
|
|
|
|
## update
|
|
|
|
SET all attribute key-value pairs
|
|
SET all relation key-value pairs
|
|
|
|
|
|
## delete
|
|
|
|
DEL all attribute key-value pairs
|
|
DEL all relation key-value pairs
|
|
make sure to update back-relations
|
|
|
|
|
|
http://redis.io/commands/hmget sounds suiteable! |