MageHost - Manage Redis

Gewijzigd op Di, 20 Dec, 2022 om 2:30 PM

Disclaimer: MageHost has joined forces with Savvii. Therefore, these articles are only relevant to existing MageHost customers. For more information on this, visit www.savvii.com/en/magehost.  


You can ask us to install separate Redis instances for each use:

  • Application Cache
  • Sessions
  • Full Page Cache
  • A queue

If you plan to use Varnish, you don't need a Redis for the Full Page Cache.

Use Redis

We use a Unix Socket to connect to Redis, except when your shop is hosted a server cluster. These sockets are located here:

/home/__USERNAME__/.config/redis/run/redis-cache.sock
/home/__USERNAME__/.config/redis/run/redis-session.sock
/home/__USERNAME__/.config/redis/run/redis-fpc.sock

You can use this socket path as server or hostname in the configuration. You can set the port to 0.

Clean Redis Cache

You may run into a situation where something is broken in the Magento cache, which prevents you from using the Admin or N98-Magerun to clean it. The command below will connect directly to the Redis instance, en execute a FLUSHDB. This command has the same effect as clearing the cache directory when you would be using a File cache.

~/bin/clean_redis-cache.sh

Clean Redis Session

It is probably not a good idea to execute this on live because all visitors will lose their shoppingcart. You can use this on a Staging account during development.

~/bin/clean_redis-session.sh

Clean Redis Full Page Cache

When you are using FPC in Redis, this command will remove all cached data.

~/bin/clean_redis-fpc.sh

Use Redis CLI

The number after -n in the commands below is the database number. These are our defaults. Using different numbers is possible but the select command is ran on each request and might cause latency.

To manage the Redis Cache:

redis-cli -n 0 -s "${HOME}/.config/redis/run/redis-cache.sock"

To manage the Redis for Full Page Cache (FPC):

redis-cli -n 0 -s "${HOME}/.config/redis/run/redis-fpc.sock"

To manage the Redis for Sessions via Redis CLI:

redis-cli -n 0 -s "${HOME}/.config/redis/run/redis-session.sock"


Was dit artikel nuttig?

Dat is fantastisch!

Hartelijk dank voor uw beoordeling

Sorry dat we u niet konden helpen

Hartelijk dank voor uw beoordeling

Laat ons weten hoe we dit artikel kunnen verbeteren!

Selecteer tenminste een van de redenen
CAPTCHA-verificatie is vereist.

Feedback verzonden

We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren