Implementation of Redis cluster lua
Two words don't say, directly on the goods. A lot of exchanges ha, thank all the gods.The main point is as follows:
Object object = redisTemplate.execute(redisUpdateOrderScript,
//If there is a key here, add "{}" as the official website says, or it will be reported as an error. All three keys here should have the same prefix
Arrays.a ...
Posted by zhangy on Sat, 02 Nov 2019 16:11:18 -0700
Shiro permission management framework: in-depth analysis of Session management in Shiro
In fact, some of Shiro's learning notes should have been written for a long time, because the late stage of lazy cancer and procrastination has not been implemented. Until today, a project of the company encountered the problem of frequent disconnection of single sign on in the cluster environment. In order to solve this problem, Shiro's releva ...
Posted by CBR on Sat, 02 Nov 2019 05:22:57 -0700
How to implement session in php, how to implement session in itself, and how to implement session in laravel
1. How to implement session in php
Execute the PHP script, session_start() will read the configuration item from php.ini, and put the generated unique value sessionID save file to the save path and location in the configuration item. And return the response header setCookie through HTTP protocolCookie name = cookie value sent to client.
The cli ...
Posted by Mchl on Sat, 02 Nov 2019 03:03:47 -0700
Learn docker docker compose -- scale from scratch
Environment preparation, the flash redis project in the previous section, starts the project:
docker-compose up -d
Starting flask-redis_web_1 ... done
Starting flask-redis_redis_1 ... done
View status:
docker-compose ps
Name Command State Ports
---------------------------------------- ...
Posted by [uk]stuff on Sat, 02 Nov 2019 02:54:00 -0700
PHP operation Redis, primary PHP can't remember to operate several times
Basic operation methods of redis
1.redis Connections for:
//Instantiate redis
$redis = new Redis();
//Connect
$redis->connect('127.0.0.1', 6379);
//Check whether the connection is successful
echo "Server is running: " . $redis->ping();
// Output result Server is running: +PONG
2.redis operation Strng (string):
// Set the value of ...
Posted by the-hardy-kid on Sat, 02 Nov 2019 00:25:09 -0700
pring boot integrates redis to realize shiro's distributed session sharing
As we know, shiro manages sessions through Session manager, while Session operations are implemented through SessionDao. By default, shiro implements two kinds of SessionDao: cacheingsessiondao and MemorySessionDAO. When we use EhCache caching, we use cacheingsessiondao. When we do not use caching, we choose internal based caching Therefore, if ...
Posted by paschim on Fri, 01 Nov 2019 11:21:02 -0700
Abstract factory pattern in design pattern
Abstract factory pattern
Originally, I didn't want to write this article, but I didn't want to write the factory mode, because everyone would, but today I saw an old fellow's blog. https://www.yuxuan66.com/16 As for the realization of the abstract pattern, it was well written. After seeing it several times, I had some ideas of myself and I was ...
Posted by tulleh on Fri, 01 Nov 2019 11:05:49 -0700
Dubbo and SSM integration (authentication and authorization) steps
1. Import the web project, create the authentication module, and modify the pom.xml file
2. Paste the profiles file into the authentication module. There are two files database.properties and redis.properties in the profiles folder.
Modify the database connection properties (user name, password, database name, etc.) in database.properties, an ...
Posted by idweb on Thu, 31 Oct 2019 20:07:50 -0700
Centos7 installs Redis5.0.5 and joins Systemd service
1. Install gcc-c++, tcl
yum install gcc-c++ tcl
2. Decompress, compile and test
tar zxvf redis-5.0.5.tar.gz
make
make test
3. Install to / opt
make PREFIX=/opt/redis/redis-5.0.5 install
# Create a soft chain
ln -s redis-5.0.5 latest
4. Configuration file. There is an example redis.conf in the source file directory. T ...
Posted by khovorka on Thu, 31 Oct 2019 13:54:46 -0700
Redis and Python interaction
Driving module
redis Module is used to drive Redis database in Python environment
Can be installed directly in pip mode
pip install redis
Or download domestic image:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
Create connection
import redis
con = redis.Redis(
host="localhost",
port="6379",
password="12345 ...
Posted by kulikedat on Thu, 31 Oct 2019 02:32:02 -0700