Experience on using the keyvalue database redis and TTSERVER. Redisredis is a keyvalue storage system similar to memcached. it supports a large number of stored value types, including string, list, and set) and zset
Redis firstRedis is a key/value storage system similar to memcached. it supports a large number of storage value types, including string, list, and s
The first says that Redis Redis is a memcached-like key/value storage system that supports a relatively large number of stored value types, including string (string), list (linked list), set ( Collection) and Zset (ordered set). On this basis, Redis supports a variety of different ways of ordering. As with memcache
Commands Clients Documentation Community DOWNLOAD support Licensejoin us in London October 19th for the 2nd Redis develope RS Day and October 20th for the Redis unconference London.redis keyspace NotificationsIMPORTANT Keyspace Notifications is a feature available since 2.8.0Feature OverviewKeyspace notifications allows clients to subscribe to PUB/SUB channels in order to receive events affecting the
Xinxing analyzes key-related commands in Redis, and Xinxing analyzes rediskey
In Redis, we can also directly operate on keys. The following are common commands:
(1) keypattern: It indicates getting all the keys matching pattern. Note that we should avoid using this command because it is very time-consuming for large databases, the performance of the
As the cache system periodically cleans up invalid data, a primary key invalidation and elimination policy is required.In Redis, a lifetime key is called volatile. When creating a cache, to set the lifetime for a given key, it may be deleted when the key expires (with a life
Open service$sudo./src/redis-server Key operation* Define and assign a variable number of apples$ redis-cli Set Dangcheng::apple::count 152Ok * Get the number of apples just now$ redis-cli Get Dangcheng::apple::count"152" * When the number of apples increases by 1 incr keyword is actually shorthand for increment$
.
Otherwise, in seconds, the remaining survival time of the key is returned.
Before Redis 2.8, when the key does not exist, or the key does not set the remaining survival time, the command returns-1.
Move:
Transfers keys in the current database to other databases
In this example, I first explicitly select database
Redis Hash Key command Implementation (T_hash)
1. Hash command Introduction
All Redis hash commands are shown in the following table: Redis hash command in detail
Serial Number
Command and Description
1
Hdel key Field2 [field2]: Delete
Original link: http://blog.csdn.net/yunhaibin/article/details/9001198
Recent research into Redis, and spring data support for Redis, has found a strange phenomenonFirst say the phenomenon, through the redistemplate under the Opsforhash method to store the value of the hash type, after the successful operation, to the Redis console to display the keys *, foun
Rename oldkey Newkey
Renaming
Dbsize
Returns the number of keys in the database
TTL key
For the key that has the expiration time set, the calculation is how long it will expire, in seconds.
Pttl Key
This command is similar to the TTL command, but it returns the remaining lifetime of the
Reprinted: http://tech.it168.com/a2011/0815/1232/000001232720_all.shtml
In previous articles, we introduced redis Quick Start: Key-value storage system introduction. Today we will further explain why we chose key-Value Store. Key-value store is a popular topic nowadays, especially when constructing large Internet app
Redis is a widely used key-value memory database. Like memecached, keys can be set to a life cycle. Setting the key expiration time in redis is very simple: SETEXmykey10Hello sets a 10-Second Life Cycle for mykey. However, when you use other redis data structures, such as LI
1. knowledge required in advance1. Every database in redis is stored in a redisDb structure. Here, redisDb. id stores the numbers represented by integers in the redis database. RedisDb. dict stores all key-value pairs of the database. RedisDb. expires stores the expiration time of each key.2. When the
For example:
I now have an array of
Array
'10000_20000'=>'上海', '20001_30200'=>'北京', '30201_30300'=>'天津', '30301_40000'=>'深圳'
)Now, I'm going to put each value in the array into the Redis cache, the cache key value can be the array key value after any processing, then I pass in a value of 38000, I want to find in the cache
After installing redis, enter the command./redis-server in the terminal to start the database. After the database is started successfully, it regularly records the connection read/write status.
After starting the database, open another terminal and directly enter the command,
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
$./
ArticleDirectory
User Logon System
Tag System
The rich data structure makes redis design very interesting. Unlike relational databases, Dev and DBA need to communicate in depth, and review does not require DBA participation for each row of SQL statements like memcached. Apsaradb for redis DBAs must be familiar with the data structure and understand the application scenarios.
Below are s
The rich data structure makes the design of Redis very interesting. Unlike relational databases, Dev and DBAs require deep communication, review each line of SQL statements, and unlike memcached, do not require DBA involvement. Redis DBAs need to be familiar with data structures and understand usage scenarios.
Here are some common examples of the KV database to talk about the design of
For example, I now have an array ({code ...}) now, I want to save each value in the array to the redis Cache. the cached key value can be the value of the array key after any processing. at this time, I input a value of 38000, I want to find the cache value with the key value containing 38000 in the cache. what is ther
What are the differences between memcached's primary key deletion method and redis?
First, memcached also uses a negative method when deleting an invalid primary key, that is, memcached does not monitor whether the primary key is invalid, but checks whether it has expired only when it accesses the primary
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.