This document is a Chinese php-redis document. it mainly describes some of the commands officially provided by apsaradb for redis. For more information, see
Phpredis is an extension of php, and the efficiency is quite high. It provides the linked
This document is a Chinese php-redis document. it mainly describes some of the commands officially provided by redis. if you have any need, you can refer to phpredis as an extension of php, efficiency is quite high with the linked list sorting
Php connection to redis database predis operations Daquan
Predis is the php database for connecting to redis. because it is fully written in php and uses a lot of namespace and closure functions, it only supports php5.3 and later versions,
Predis is the PHP connection Redis Operation Library, because it completely uses PHP writing, a lot of use of namespaces and closures and other functions, only support php5.3 above, so the measured performance, 25,000 times per second read and write.
From: http://blog.sina.com.cn/s/blog_4b75b0020100neea.html
Redis is widely known. Baidu ~Phpredis is an extension of PHP, and the efficiency should not be poor.As follows:Https://github.com/owlient/phpredis (support for redis 2.0.4)
This document
Introduced
Redis is a key-value storage system. Like memcached, it supports a relatively larger number of stored value types, including string (string), list (linked list), set (set), Zset (sorted set– ordered set), and hash (hash type). These data
Use AutoLoad to load related libraries, this point is to require $file; Spl_autoload_register (function ($class) {$file = __dir__. ' /lib/predis/'. $class.
PHP ';
if (file_exists ($file)) {require $file; return true;}});
Configure the connected IP,
$redis = new Redis ();
Connect, open link Redis service
Parameters
host:string, service address
Port:int, port number
timeout:float, link duration (optional, default = 0, unlimited link time)
Note: There is also time in redis.conf, default is
Use AutoLoad to load the relevant library, this is the key torequire$file; Spl_autoload_register (function ($class) {$file = __dir__. ' /lib/predis/'. $class. PHP '; if (file_exists ($file)) {require $file; return true;}); /Configure the connected
1. Problems with the mysql+memcached architecture
The actual MySQL is suitable carries on the massive data storage, through memcached hot spot data loading to the cache, speeds up the visit, many companies have used this kind of architecture, but
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.