The laravel5.1 version I use uses Cache to cache data, and memcached and the database are used at the same time. But now there is a question. When laravel puts the data into the cache, it will cache the data at the same time. Encryption, the encryption parameters include the mac address of the machine?
The company's business uses 6 web machines for load balancing. In this case, after one machine is put into memcached or mysql, only this machine can After obtaining the data, other machines will get error messages: the mac is invalid
In this case, laravel can only be used normally on one machine? In this way, load balancing cannot be used at all!
The database is encrypted When encrypting, you can bring the mac address for encryption, and you can still understand by verifying the mac address when decrypting. If you use memcached on laravel, you have to verify the mac address, then there is no reason to use memcached! Please can you explain it, thank you~!
黄舟2017-07-07 10:36:27
No, and the mac
here does not mean the mac address, it refers to hmac
HMAC is a key-related hash operation message authentication code. The HMAC operation uses a hash algorithm, takes a key and a message as input, and generates a message digest as the output.
In addition, the encryption key
set in the .env
below the code of each laravel
must be consistent.