Category: Redis
-
Post Views: 16 1. The current implementation principle of the theme editor is: when a configuration item in the editor changes, the temporary storage API of the backend will be requested to cache the data to Redis. When the user clicks the save button, the save API of the backend is requested, and the data will be read from Redis…
-
Post Views: 15 1. Only errors are reported in Linux: Failed to load type: OnlineStoreEthemePreset. Make sure the type is present in your schema definition. It is available in the local Windows 10 environment. as shown in Figure 1 2. Execute the command: php artisan cache: clear, clear the cache. The interface request was successful. The reason is that GraphQL…
-
Post Views: 17 1. When using Redis with Laravel, there are two solutions, one is to install the phpredis php extension, and the other is to install the predis/predis package through composer. However, Predis has been abandoned by the original author of the package and may be removed from Laravel in future releases. It was finally decided to use the…
-
Post Views: 18 1. There are now 2 projects, and their domain names are: Object.local, Object-master.local. The redis configuration of its .env file is as follows 2. However, the performance at this stage is that both projects still use Redis 1. The problem caused by sharing a Redis 1 database is that when Object.local is opened, and then Object-master.local is…
-
Post Views: 17 1. In Laravel 6, access:https://object.local, 302 jump tohttps://xxx.xxx.xxx.top. as shown in Figure 1 2. Look in the source code: xxx.xxx.xxx.top, not found. And the database has replaced all xxx.xxx.xxx.top with Object.local. 3. There is a key name in Redis: laravel_cache:main_domain_cache, its value: s:26:”xxx.xxx.xxx.top”;. as shown in Figure 2 4. After clearing Redis, visit again:https://object.local, the response 500.…
-
Post Views: 14 1. When executing the command: php artisan larabbs:calculate-active-user, an error is reported: classredisnot found. as shown in Figure 1 2. The cache is used in this command, and redis is used as the cache driver. Edit the .dev file and add: redis_client=predis 3. Execute the command again: php artisan larabbs:calculate-active-user, no more errors are reported. as shown…
-
Post Views: 18 1. Reference URL:https://www.shuijingwanwq.com/2017/01/08/1505/, the process of realizing the locking mechanism of Redis under Yii2.0, its core is to use Redis SetNX. 2. Generally speaking, after the lock is successful, the corresponding business logic is executed, and then the lock is deleted. However, if the business logic is accidentally exited for some reason, resulting in a lock but…