bagisto / bagisto-varnish
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
Language:VCL
This package is auto-updated.
Last update: 2024-09-29 06:20:28 UTC
README
Varnish setup for Bagisto E-commerce.
Note: This setup is only for Bagisto E-commerce. If you want you can customize this as per your need.
Requirements
-
You need to setup the Varnish 6 in your system.
-
Copy all the contents of the
vcls/6.0.vcl
file to the/etc/varnish/default.vcl
. -
Restart your varnish server.
Installation
-
Run
composer require bagisto/bagisto-varnish
. -
After that
cacheable
middleware is available for your routes. Use thiscacheable
middleware to the routes which you want to cache. -
In
packages/Webkul/Shop/src/Routes/store-front-routes.php
, addcacheable
in middleware key,# File: packages/Webkul/Shop/src/Routes/store-front-routes.php ... Route::group(['middleware' => ['web', 'locale', 'theme', 'currency', 'cacheable']], function () { ... }); ...
-
In
packages/Webkul/Velocity/src/Routes/front-routes.php
, addcacheable
in middleware key,# File: packages/Webkul/Velocity/src/Routes/front-routes.php ... Route::group(['middleware' => ['web', 'locale', 'theme', 'currency', 'cacheable']], function () { ... }); ...
-
Run
php artisan optimize:clear