Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bagisto/bagisto-varnish
Varnish setup for Bagisto.
https://github.com/bagisto/bagisto-varnish
Last synced: 4 days ago
JSON representation
Varnish setup for Bagisto.
- Host: GitHub
- URL: https://github.com/bagisto/bagisto-varnish
- Owner: bagisto
- License: mit
- Created: 2022-04-27T08:51:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-04-29T13:52:33.000Z (over 2 years ago)
- Last Synced: 2024-04-24T12:26:17.920Z (7 months ago)
- Language: VCL
- Homepage: https://github.com/bagisto/bagisto
- Size: 13.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Bagisto Varnish
Varnish setup for [Bagisto E-commerce](https://github.com/bagisto/bagisto).
Note: This setup is only for [Bagisto E-commerce](https://github.com/bagisto/bagisto). 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 this `cacheable` middleware to the routes which you want to cache.
- In `packages/Webkul/Shop/src/Routes/store-front-routes.php`, add `cacheable` in middleware key,
~~~php
# 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`, add `cacheable` in middleware key,
~~~php
# File: packages/Webkul/Velocity/src/Routes/front-routes.php
...
Route::group(['middleware' => ['web', 'locale', 'theme', 'currency', 'cacheable']], function () {
...
});
...
~~~- Run `php artisan optimize:clear`