2017 © Pedro Peláez
 

magento2-module cachehostsmanager

Allows the purge/clear/flush of the PHP OpCache via the CLI and Magento2 Backend

image

webfixit/cachehostsmanager

Allows the purge/clear/flush of the PHP OpCache via the CLI and Magento2 Backend

  • Wednesday, June 20, 2018
  • by wiardvanrij
  • Repository
  • 1 Watchers
  • 4 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 2000 % Grown

The README.md

Magento2 cache hosts Manager

Allows to manage your cache hosts via the CLI. You can add for instance Varnish servers and remove them again in the configuration., (*1)

Status

I believe this package is stable. Yet I want to warn you about using it in production:, (*2)

  • It has not been used intensively by the community
  • Magento core changes often - I cannot guarenty this package will work on the next update.
  • Make sure you have the correct backups of your configurations.

When you are in need of a tool like this, I assume you have somewhat decent knowledge the make the right calls ;), (*3)

Why

Because the default CLI setting (config:set --http-cache-hosts) is not usefull. The config:set commands overrides all your hosts. Imagine a dynamic setup where you add a new server. The configuration (env.php) is shared via a NFS (or whatever volume). You must know all hosts if you want to add your new host., (*4)

With this manager you can simply do bin/magento cachehosts:add {currenthost} and it will append the server, rather than overriding all your servers, (*5)

About me

I'm a DevOps engineer for a full service digital agency in the Netherlands. When possible I try to create opensource scripts / extentions and tools. If you appriciate my work, please be so kind to donate so I can keep drinking beer., (*6)

paypal, (*7)

How the CLI works

There are 2 commands:, (*8)

bin/magento cachehosts:add, (*9)

bin/magento cachehosts:remove, (*10)

Arguments are the host(s), comma seperated, (*11)

CLI Usage

Add, (*12)

// Using default port
bin/magento cachehosts:add 127.0.0.1
// Adding multiple hosts
bin/magento cachehosts:add 127.0.0.1,127.0.0.2
// Adding with port
bin/magento cachehosts:add 127.0.0.1:1337

Remove, (*13)

// Using default port
bin/magento cachehosts:remove 127.0.0.1
// Removing multiple hosts
bin/magento cachehosts:remove 127.0.0.1,127.0.0.2
// Removing with port
bin/magento cachehosts:remove 127.0.0.1:1337

Mixing up, (*14)

bin/magento cachehosts:remove 127.0.0.1:1337,127.0.0.1

It is ok to have the same host on different ports., (*15)

Install with Composer

composer require webfixit/cachehostsmanager

The Versions

20/06 2018

dev-master

9999999-dev

Allows the purge/clear/flush of the PHP OpCache via the CLI and Magento2 Backend

  Sources   Download

OSL-3.0

20/06 2018

1.0.1

1.0.1.0

Allows the purge/clear/flush of the PHP OpCache via the CLI and Magento2 Backend

  Sources   Download

OSL-3.0

12/05 2018

1.0.0

1.0.0.0

Allows the purge/clear/flush of the PHP OpCache via the CLI and Magento2 Backend

  Sources   Download

OSL-3.0