GithubHelp home page GithubHelp logo

lizardmedia / varnish-warmer-magento2 Goto Github PK

View Code? Open in Web Editor NEW
57.0 11.0 23.0 130 KB

Magento2 module for handling Varnish cache (flushing, regenerating)

License: MIT License

PHP 100.00%
magento2 magento2-module varnish-cache

varnish-warmer-magento2's People

Contributors

gtlt avatar krzysztofkuzniar avatar maciejslawik avatar michalkobierzynski avatar zbigniewkuraslm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

varnish-warmer-magento2's Issues

Magento 2.4.4 using php 8.1

Wondering if this excellent Varnish module could be updated for Magento 2.4.4 using php 8.1?

Thanks for this project!

PHP Fatal error: Class 'Evenement\EventEmitter' not found

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?

About Magento 2.3 Support

Hello good afternoon

About Magento 2.3 Support

As images we see that error is displayed when trying to install your module, can you help me

captura de tela de 2019-02-11 21-03-42

Varnish Purge BadRequest 400 because of X-Magento-Tags-Pattern or X-Pool header required

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 ?

Regenerate without purging

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

Wrong baseUrl with multiple storeview leads to wrong urls

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.

Customer Groups

Can this module handle multiple customer groups for a particular store?

curl-easy block composer with magento 2.3

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.

Array to string conversion error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.