![]() Important: If you use Redis for more than one type of caching, the database numbers must be different. You must specify the database number of one of the caches the other cache uses 0 by default. Required if you use Redis for both the default and full page cache. page-cache-redis-= is a list of key-and-value pairs that configure page caching: If this feature has already been enabled, omit this parameter. page-cache=redis enables Redis page caching. bin/magento setup:config:set -page-cache=redis -page-cache-redis-=. To configure Redis page caching on Commerce, run the setup:config:set command with additional parameters. bin/magento setup:config:set -cache-backend=redis -cache-backend-redis-server=127.0.0.1 -cache-backend-redis-db=0 Redis uses default values for all other parameters. The following example enables Redis default caching, sets the host to 127.0.0.1, and assigns the database number to 0. The password is configured directly in Redis’ configuration file: /etc/redis/nf It is recommended that you assign the default caching database number to 0, the page-caching database number to 1, and the session storage database number to 2.Ĭonfiguring a Redis password enables one of its built-in security features: the auth command, which requires clients to authenticate to access the database. ![]() Required if you use Redis for both the default and full-page cache. The default value of 127.0.0.1 indicates Redis is installed on the Commerce server. cache-backend-redis-= is a list of key-and-value pairs that configure the default caching:įully qualified hostname, IP address, or an absolute path to a UNIX socket. cache-backend=redis enables the Redis default caching. bin/magento setup:config:set -cache-backend=redis -cache-backend-redis-=. Run the setup:config:set command and specify parameters that specific to Redis default caching. You must install Redis before continuing. ![]() The command line provides validation, ensuring the configuration is syntactically correct. Although you can configure caching by editing the app/etc/env.php file, using the command line is the recommended method, especially for initial configurations. Commerce provides command-line options to configure the Redis page and default caching.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |