{"id":16908808,"url":"https://github.com/wiardvanrij/m2-cache-hosts-manager","last_synced_at":"2025-04-11T15:42:22.168Z","repository":{"id":62547699,"uuid":"133071612","full_name":"wiardvanrij/m2-cache-hosts-manager","owner":"wiardvanrij","description":"Magento 2 extension to manage the http cache hosts by allowing you to add varnish server dynamicly and removing them too","archived":false,"fork":false,"pushed_at":"2018-06-20T20:06:55.000Z","size":6,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T07:54:56.568Z","etag":null,"topics":["cli","magento","magento-2","magento-2-extension","magento-module","magento2","magento2-extension","magento2-module","manager","php","php7","plugin","varnish","varnish-cache"],"latest_commit_sha":null,"homepage":"https://sysrant.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiardvanrij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-11T17:53:55.000Z","updated_at":"2022-02-12T08:05:29.000Z","dependencies_parsed_at":"2022-11-02T22:16:12.048Z","dependency_job_id":null,"html_url":"https://github.com/wiardvanrij/m2-cache-hosts-manager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiardvanrij%2Fm2-cache-hosts-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiardvanrij%2Fm2-cache-hosts-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiardvanrij%2Fm2-cache-hosts-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiardvanrij%2Fm2-cache-hosts-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiardvanrij","download_url":"https://codeload.github.com/wiardvanrij/m2-cache-hosts-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248433203,"owners_count":21102529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","magento","magento-2","magento-2-extension","magento-module","magento2","magento2-extension","magento2-module","manager","php","php7","plugin","varnish","varnish-cache"],"created_at":"2024-10-13T18:53:04.918Z","updated_at":"2025-04-11T15:42:22.151Z","avatar_url":"https://github.com/wiardvanrij.png","language":"PHP","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=UDG2ZGDZ9TMEE"],"categories":[],"sub_categories":[],"readme":"# Magento2 cache hosts Manager\n\nAllows to manage your cache hosts via the CLI. You can add for instance Varnish servers and remove them again in the configuration.\n\n## Status\nI believe this package is stable. Yet I want to warn you about using it in production: \n\n- It has not been used intensively by the community\n- Magento core changes often - I cannot guarenty this package will work on the next update.\n- Make sure you have the correct backups of your configurations. \n\nWhen you are in need of a tool like this, I assume you have somewhat decent knowledge the make the right calls ;)\n\n## Why\nBecause the default CLI setting `(config:set --http-cache-hosts)` is not usefull. \nThe config:set commands overrides *all* your hosts. Imagine a dynamic setup where you add a new server. The configuration (env.php) is shared via\na NFS (or whatever volume). You must know *all* hosts if you want to add your new host.\n\nWith this manager you can simply do `bin/magento cachehosts:add {currenthost}` and it will append the server, rather than overriding all your servers\n\n## About me\nI'm a DevOps engineer for a full service digital agency in the Netherlands. When possible I try to create opensource\nscripts / extentions and tools. If you appriciate my work, please be so kind to donate so I can keep drinking beer.\n\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=UDG2ZGDZ9TMEE)\n\n## How the CLI works\nThere are 2 commands:\n\n` bin/magento cachehosts:add`\n\n` bin/magento cachehosts:remove`\n\nArguments are the host(s), comma seperated\n\n\n### CLI Usage\n\nAdd\n```bash\n// Using default port\nbin/magento cachehosts:add 127.0.0.1\n// Adding multiple hosts\nbin/magento cachehosts:add 127.0.0.1,127.0.0.2\n// Adding with port\nbin/magento cachehosts:add 127.0.0.1:1337\n```\n\nRemove\n```bash\n// Using default port\nbin/magento cachehosts:remove 127.0.0.1\n// Removing multiple hosts\nbin/magento cachehosts:remove 127.0.0.1,127.0.0.2\n// Removing with port\nbin/magento cachehosts:remove 127.0.0.1:1337\n```\n\nMixing up\n```bash\nbin/magento cachehosts:remove 127.0.0.1:1337,127.0.0.1\n```\n\nIt is ok to have the same host on different ports.\n\n## Install with Composer \n\n```bash\ncomposer require webfixit/cachehostsmanager\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiardvanrij%2Fm2-cache-hosts-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiardvanrij%2Fm2-cache-hosts-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiardvanrij%2Fm2-cache-hosts-manager/lists"}