NoSQL: A new class of emerging databases (not only SQL)
A non-relational database
SQL syntax not supported
The storage structure is completely different from the relational table in the traditional relational database, and the data
Introduction to using Redis as a cache for MySQL
In the actual project, the MySQL database server is sometimes located in another host, need to access the database through the network, even if the application and the MySQL database in the
Redis is a key-value storage system, similar to memcached, which supports storing more value types, including string (string), list (linked list), set (set), Zset (ordered collection), GEO (coordinate), and hash ( Hash type). These operations
The database is divided into two categories:1. Relational database: Mysql,oracle,sql server,db2,sqliteSQL statement Requireddata exists on disk2. Non-relational database: MongoDB, RedisNo table structureNo SQL statementuse Get (' K '), set (' xx
1. Redis and memcache all store data in memory, which is the memory database. But Memcache can also be used to cache other things, such as films, videos and so on; 2,Redis not only support simple k/v type of data, but also provide list,set,hash and
Installation: 1. Get Redis Resourceswget http://download.redis.io/releases/redis-4.0.8.tar.gz2. UnzipTar xzvf redis-4.0. 8. tar.gz3. Installation
CD redis-4.0.8
Make
CD src
Make install Prefix=/usr/local/redis
You need to remove the value from the original Redis key stored in the project startup, so use Scan_iter to facilitate the relevant key and delete it.There are two performance issues to be aware of1. Scan_iter's fuzzy matching filter should be
Store data in the list advanced (left-forward)Lpush names A B C D EStore Data LIFO (right-forward) in the listRpush names G P H KTo view the data in the list:Lrange names 0 (starting from 0)-1Slice:Lrange names start end (start end stands for
Store data in the list advanced (left-forward)Lpush names A B C D EStore Data LIFO (right-forward) in the listRpush names G P H KTo view the data in the list:Lrange names 0 (starting from 0)-1Slice:Lrange names start end (start end stands for
Redis installation skippedFirst import the Jedis.jar package1. Connect to Redis ServiceWrite a simple program: package Com.fpc.Test; import Redis.clients.jedis.Jedis; public class Manipulateredis { public static void main (string[] args)
1. Add @EnableCaching annotations on the startup class (no jar package required, as already available)2. Add @cacheable (cachenames = "blog", key= "123") on the method that requires caching3. When you want to change, add the annotation @cacheput in
(Turn) Original: http://www.cnblogs.com/M-LittleBird/p/5902850.htmlTo make Redis run under PHP, add the extension file to the Ext extension folder under PHP files
Php_igbinary.dll
Php_redis.dll
Modify php.ini configuration items at
Redis is a key-value storage system. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), and Zset (ordered collection). These data types support Push/pop, Add/remove, and intersection-
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