Properly Configure Redis

Redis is a Remote Dictionary server, is a fast, open source, in-memory, key value data store.

Redis is used for PHP session storage.

Backend support tag-based cache-cleanup without foreach loops.

Redis magento 2 configuration for default caching

Run the Setup:config:set command and specify parameters that are specific to Redis default caching.
$bin/magneto setup:config:set–cache-backend-redis-=
To enables the Redis default caching.
is a list of key/value pairs that configure the defualt parameter.
is a list of key/value pairs that configure the default caching.
$ bin/magento setup:config:set –page-cache=redis –page-cache-redis-=

Configure Redis Page caching

To configure Redis page caching on the setup:config:set command with additional parameters
$bin/magento setup:config:set –page cache=redis –page-cache- redis-=
To enable Redis page caching.
is a list of parameter pairs that configure page caching
— page-cache- redis-=
The following example enables Redis page caching sets the host to and assign the database number to 2
basically parameters are set to the default value.
$ bin/magento setup:config:set –page-cache-redis-server= –page—cache-redis-db=1