lizardmedia / varnish-warmer-magento2 Goto Github PK
View Code? Open in Web Editor NEWMagento2 module for handling Varnish cache (flushing, regenerating)
License: MIT License
Magento2 module for handling Varnish cache (flushing, regenerating)
License: MIT License
Hello
the Url is
https://shop.local/women/tops-women/jackets-women.html
but should be:
https://shop.local/en_us/women/tops-women/jackets-women.html
Wondering if this excellent Varnish module could be updated for Magento 2.4.4 using php 8.1?
Thanks for this project!
hi, i'm running magento2.2.3 with varnish5 and seems some dependency missed, because i'm getting this error after each console command:
PHP Fatal error: Class 'Evenement\EventEmitter' not found in /vendor/react/http-client/src/Request.php on line 18
Fatal error: Class 'Evenement\EventEmitter' not found in /vendor/react/http-client/src/Request.php on line 18
could you pls advice what's wrong there?
Hi,
Version 2.2.0 is not available by composer for PHP 7.3. Max version is 2.1.0
composer require lizardmedia/module-varnish-warmer:2.2.0
Thanks
is it not available?
I use PHP 7.3
Hi,
I don't think the purge works with a standard varnish config, either from cli or admin page.
Example :
php bin/magento lm-varnish:cache-purge-homepage --verify_peer false
in varnishlog I have X-Magento-Tags-Pattern or X-Pool header required
- ReqMethod PURGE
- ReqURL /
...
- VCL_call RECV
- VCL_acl MATCH purge "x.x.x.x"
- VCL_return synth
- VCL_call HASH
- VCL_return lookup
...
- RespStatus 400
- RespReason Bad Request
- RespReason X-Magento-Tags-Pattern or X-Pool header required
My varnish config contains :
sub vcl_recv {
...
if (req.method == "PURGE") {
if (client.ip !~ purge) {
return (synth(405, "Method not allowed"));
}
# To use the X-Pool header for purging varnish during automated deployments, make sure the X-Pool header
# has been added to the response in your backend server config. This is used, for example, by the
# capistrano-magento2 gem for purging old content from varnish during it's deploy routine.
if (!req.http.X-Magento-Tags-Pattern && !req.http.X-Pool) {
return (synth(400, "X-Magento-Tags-Pattern or X-Pool header required"));
}
if (req.http.X-Magento-Tags-Pattern) {
ban("obj.http.X-Magento-Tags ~ " + req.http.X-Magento-Tags-Pattern);
}
if (req.http.X-Pool) {
ban("obj.http.X-Pool ~ " + req.http.X-Pool);
}
return (synth(200, "Purged"));
}
...
}
I don't know exactly how this tag X-Magento-Tags-Pattern works, but doesn't we need to add it to each curl request with the relative url to be purged ?
Hi,
Is there an option to regenerate the cache without purging first? ie. if cache is flushed via magento admin is there a command option just to regenerate?
Thanks
Hi,
I have a site with multiple storeview, each on its own subdomain.
The urls generated should take into account baseUrl per storeview. Currently, only the default one is taken into account. All non default language urls are wrong.
Example :
StoreView EN baseUrl : en.mysite.com
StoreView FR baseUrl : fr.mysite.com
Currently generated urls :
en.mysite.com/en-url-1
en.mysite.com/fr-url-1
it should be :
en.mysite.com/en-url-1
fr.mysite.com/fr-url-1
Something like adding \Magento\Store\Model\StoreManagerInterface $storeManager in CacheCleaner to loop on all storeviews and filtering url_rewrite queries on store_id should fix it.
In 2.4.6-p3 the overriden method \Symfony\Component\Console\Command\Command::execute needs to return an integer.
Can this module handle multiple customer groups for a particular store?
requirement "stil/curl-easy": "^1.1" block magento 2.3 composer update
I think it is because of curl-easy requiring "symfony/event-dispatcher": "^3.2". My magento composer.lock reference "symfony/event-dispatcher": "~4.1.0"
Per your readme curl-easy is only required with zip file, so I suggest to get rid of if in composer requirement.
will it work without varnish ?
Hi,
I got this error when running CLI commands, any of it:
In ErrorHandler.php line 61:
Notice: Array to string conversion in /var/www/html/xxx/vendor/lizardmedia/module-varnish-warmer/Model/QueueHandler/AbstractQueueHandler.php
on line 130
lm-varnish:cache-purge-general [--store [STORE]]
Configuration is the following:
PHP 7.4.22 (cli) (built: Jul 27 2021 18:08:31) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.22, Copyright (c), by Zend Technologies
Magento CLI 2.4.3
varnishd (varnish-6.0.8 revision 97e54ada6ac578af332e52b44d2038bb4fa4cd4a)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2020 Varnish Software AS
Any ideas?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.