redis affairs and news subscriptions and publishing

Begin transaction: multi open end of the exec

The latter two cases mutil statement

1. syntax error, exec time error, can not perform all of

2, syntax itself is not wrong, but the application of the object in question, will perform the correct statement, skip the statement does not apply

3.discard cancel the transaction (not execute in queue inside)

4, watch key1 key2 key3 monitor key, if the change does not perform the transaction, control of data consistency

5, unwatch unmonitor

Subscribe to the news release

publish key value announced

subscribe subscribe key (as long as the subscription channel, the client turned on, you can post messages received to)

psubscribe key * subscribe to multiple channels (with regular matches)

rdb persistent snapshot

Working principle: every N times and N minutes after the write operation, the memory dump file rdb is formed from data compression in the backup directory

In redis.conf configuration

Setting the beginning of the save, in front of a second time, it is behind a number of writes

save 60 10000 60 10000 Miao

Yes, when written to disk 2.stop-writes-on-bgsave-error mistakes, stop writing

3. Export data compression, rdbcompression yes

Check when introduced 4.rdbchecksum yes

5.dbfilename dump.rdb compressed file

6.dir ./ rdb compressed file storage directory

Guess you like

Origin www.cnblogs.com/linhuage520/p/11914506.html