Redis Introduction
Remote DIctionary server, which is completely open source free, written in C, and following the BSD protocol, is a high-performance (KV) distributed memory database that runs on memory and supports persistent NoSQL databases, is
The previous company in the development phase of the Redis has been the formal environment, the recent boss let me in a local area network for the development phase of the Redis connection use, build process also encountered some problems,
Original code
Object ss = Redis.opsforhash (). Get (Ssbfcs, Llhb_kspsll_ + ID);
Get all the corresponding file names
if (NULL = ss) {
Judge if it's empty.
Redis.opsforhash (). Put (Ssbfcs, Llhb_kspsll_ + ID, "1");
If it's empty, add a new
first, the MyBatis cache
Like most ORM layer frameworks, MyBatis naturally provides support for first-level caching and level two caching. This is the role and definition of the first-level cache and the level two cache.
1, the first cache is the
thought → idea → action → habit → personality → Destiny
Program.cs Content:
Using Newtonsoft.json;
Using Stackexchange.redis;
Using System;
Using System.Data;
Using System.IO;
Using System.Runtime.Serialization.Formatters.Binary; Namespace
I went out for an interview yesterday and was asked by the interviewer how to view the memory footprint of the Redis. I've never had a problem with this, I went back to the company, checked it out, and recorded this problem in this. How to view the
Redis Cache Server NotesRedis is a high-performance key-value storage system that can serve as a caching framework and queueBut since he is a memory memory system, the data is stored in the database
As a caching framework:create/updae/delete-at the
Redis Common Command set
1 Connection operation Command quit: Close the connection (connection) Auth: simple password Authentication help cmd: View cmd assistance, for example: helping quit
2 Persistent Save: Synchronize data to disk Bgsave:
Before you say Redis persistence, you need to figure out what the concept of database state is, because the persistence is to save the state of the database in memory to disk. So what is the database state? Redis is a key-value database server,
The first step: Download the Redis installation package
wget http://download.redis.io/releases/redis-4.0.9.tar.gz
To download which version can copy the above link delete redis-* part of the content, you can view all the Redis version of the
1.Redis vs. MySQL transaction
(1) The difference between rollback and discard: If 2 statements have been successfully executed, 3rd error rollback, the impact of the first 2 statements has disappeared discard the impact of the first 2 statements
SORTEDSET data Structures SortedSet and set types are very similar, and they are all collections of strings that do not allow duplicate members to appear in a set collection. The main difference between them is that each member of the SortedSet will
Like the reason for MySQL master-slave replication, Redis reads and writes are particularly fast, but it can also produce a particularly high read pressure situation. In order to share the read pressure, Redis supports master-slave replication, and
keys keyword common directives
Here bloggers first set K1 v1 k2 v2Exists key
Determine if key exists
Move Key Dbnum
Move key values to Dbnum libraryHere move K1 to library 2nd, view current library only K2, after switching to library 2nd, view the
Six features of Redis
L Strings
L HASHS
L Lists
L Sets
L Sorted Sets
L PUB/SUB Application Scenarios for Redis features Strings
The Strings data structure is a simple key-value type, and value is not only a string, it can also be a number. Common
1. Download the installation package, unzip, build the soft chain
wget http://download.redis.io/releases/redis-4.0.8.tar.gz
tar zxvf redis-4.0.8.tar.gz-c/opt
cd/opt
Ln -SV Redis-4.0.8/redis
Redis and redis-4.0.8 Two folders will be available in
Operation:Step 1:d:\wamp\bin\apache\apache2.4.9\bin/php.ini Add; Php_redisextension=php_igbinary.dllextension=php_redis.dllStep 2: Copy the downloaded Php_redis.dll and php_redis.pdb to D:\wamp\bin\php\php5.5.12\extStep 3: Install the window
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service