PHPackages                             webscale-networks/magento-varnish-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. webscale-networks/magento-varnish-api

ActiveMagento2-module[Caching](/categories/caching)

webscale-networks/magento-varnish-api
=====================================

Webscale Varnish magento extension

1.2.6(5mo ago)111.4k↓45.8%1[3 PRs](https://github.com/webscale-networks/magento-varnish-api/pulls)1MITPHPPHP ^7.2 || ^8.1

Since Sep 20Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/webscale-networks/magento-varnish-api)[ Packagist](https://packagist.org/packages/webscale-networks/magento-varnish-api)[ RSS](/packages/webscale-networks-magento-varnish-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (25)Used By (1)

Webscale Varnish for Magento 2
==============================

[](#webscale-varnish-for-magento-2)

Webscale Varnish is a Magento 2 extension that connects your store’s full page cache to the Webscale Control Plane, so your store is cached – and stays in sync – at the edge.

> **In short:** Magento → Webscale Varnish (this extension) → Webscale Control Plane → Varnish at the edge.

- **Supports:** Magento `2.3.x`, `2.4.x`
- **Needs:** Webscale account (API token + Application ID / environment)
- **Docs:** See [Further documentation](#further-documentation)

---

How it works (high level)
-------------------------

[](#how-it-works-high-level)

Webscale Varnish does **not** invent its own cache invalidation rules. Instead it relays Magento’s existing invalidations to the Webscale platform:

**Magento → Webscale Varnish (this extension) → Webscale Control Plane → Varnish**

- Magento generates cache invalidation events based on your store configuration.
- The Webscale Varnish extension receives those events and sends them to Webscale.
- The Webscale Control Plane applies the invalidations to your edge Varnish cache.

Misconfigured or overly aggressive invalidation in Magento will therefore still result in frequent cache flushes at the edge.

---

Requirements
------------

[](#requirements)

- Magento: `2.3.x` or `2.4.x`
- A Webscale account with:
    - API token
    - Application ID / environment configured for your Magento store

---

Quick start (installation)
--------------------------

[](#quick-start-installation)

Run the following in your Magento root directory.

1. **Add the Webscale repository**

    ```
    composer config repositories.webscale-networks-api git https://github.com/webscale-networks/magento-varnish-api.git
    ```

    To avoid CI/CD issues with GitHub, set `"no-api": true` in your `composer.json`:

    ```
    "repositories": {
      "webscale-networks-api": {
        "type": "git",
        "url": "https://github.com/webscale-networks/magento-varnish-api.git",
        "no-api": true
      }
    }
    ```
2. **Require the extension**

    ```
    composer require webscale-networks/magento-varnish-api
    ```
3. **Enable the module and update Magento**

    ```
    php bin/magento module:enable Webscale_Varnish
    php bin/magento setup:upgrade
    bin/magento cache:clean
    ```
4. **Log into the Magento Admin**

    After deployment, log into the Magento admin panel to complete configuration.

---

Configure Webscale Varnish
--------------------------

[](#configure-webscale-varnish)

Once the module is installed, configure it in the Magento admin.

### 1. Configure Webscale credentials

[](#1-configure-webscale-credentials)

1. In the Magento admin, go to:

    ```
    Stores > Configuration > Webscale > Webscale Varnish

    ```
2. Under **General Configuration**:

    - Set **Enabled** to **Yes**.
    - Enter your **API token**.
    - Enter your **Application Id** (the Webscale application/environment that corresponds to this Magento store).
3. Click **Save Config**.

[![Webscale Varnish Configuration](Documentation/enable-extension2.png "Webscale Varnish Configuration Page")](Documentation/enable-extension2.png)

### 2. Use Varnish for Magento FPC

[](#2-use-varnish-for-magento-fpc)

1. In the Magento admin, go to:

    ```
    Stores > Configuration > Advanced > System > Full Page Cache

    ```
2. In the **Caching Application** field, select **Varnish Cache**.
3. Save the configuration.

[![Webscale Varnish Configuration](Documentation/caching-application.png "Caching Application")](Documentation/caching-application.png)

Your store’s full page cache will now be served by Varnish and integrated with Webscale via this extension.

---

Optional configuration
----------------------

[](#optional-configuration)

These options are available in the **Webscale Varnish** configuration section.

### Debug mode

[](#debug-mode)

[![Webscale Varnish Configuration](Documentation/debug-logs.png "Debug Logging")](Documentation/debug-logs.png)

Enable **Debug** under the **Developer** section to get more detailed logs from the extension.

- Log file path: `var/log/webscale.log` in your Magento root.
- Use this when troubleshooting cache behavior or connectivity with Webscale.

### Cache events

[](#cache-events)

[![Webscale Varnish Configuration](Documentation/cache-events.png "Cache Flush by Events")](Documentation/cache-events.png)

The **Cache Events** section lists Magento events that trigger Webscale cache flushes. All events are selected by default.

- Deselect events to **reduce how often the cache is invalidated**.
- Keep only the events that are necessary for your business requirements.

> **Important**
>
> Too many invalidation events can increase load on your origin and APIs. Review events carefully on busy or heavily integrated stores.

### Scheduled full cache flush

[](#scheduled-full-cache-flush)

[![Webscale Varnish Configuration](Documentation/scheduled-full-cache-flush.png "Scheduled Full Cache Flush")](Documentation/scheduled-full-cache-flush.png)

Webscale Varnish supports a scheduled *full* cache flush via cron.

- When **Scheduled Full Cache Flush** is enabled:
    - Partial (per-tag) invalidation is **disabled**.
    - The entire Webscale Varnish cache is flushed on a schedule.

You can choose one of three frequency modes:

- **Hourly**
- **Daily**
- **Custom** (provide a cron expression)

A cron expression helper in the UI shows the generated schedule.

> **Warning**
>
> Full cache flushes are expensive. Use scheduled full flush only when you need a predictable reset schedule and have validated the performance impact in a staging or non-production environment.

---

Managing Webscale Varnish cache from Magento
--------------------------------------------

[](#managing-webscale-varnish-cache-from-magento)

[![Webscale Varnish Configuration](Documentation/flush-cache.png "Flush Cache")](Documentation/flush-cache.png)

Webscale Varnish cache is automatically flushed in response to Magento’s native cache events (full cache flush and per-tag invalidation).

To flush *only* the Webscale Varnish cache from the Magento admin:

1. Go to:

    ```
    System > Tools > Cache Management

    ```
2. In **Additional Cache Management**, click **Flush Webscale Varnish Cache**.

This clears only the Webscale Varnish cache, without flushing all Magento caches.

---

Related extensions
------------------

[](#related-extensions)

- [webscale-networks/magento-varnish-split-header](https://github.com/webscale-networks/magento-varnish-split-header)
    Sub-module that splits the `X-Magento-Tags` header when Varnish is selected as a cache solution, to avoid oversized headers.

---

Further documentation
---------------------

[](#further-documentation)

Platform-wide Webscale and Varnish documentation, configuration guidance, and troubleshooting guides are available at:

-

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance72

Regular maintenance activity

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~158 days

Total

10

Last Release

157d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05b3cdf998095d47a5ffa3eef8b6e7893c44d33331312fa75516b5598946d1e4?d=identicon)[webscale networks](/maintainers/webscale%20networks)

---

Top Contributors

[![igor-webscale](https://avatars.githubusercontent.com/u/137203076?v=4)](https://github.com/igor-webscale "igor-webscale (26 commits)")[![olekspanchenko](https://avatars.githubusercontent.com/u/173961269?v=4)](https://github.com/olekspanchenko "olekspanchenko (12 commits)")

### Embed Badge

![Health badge](/badges/webscale-networks-magento-varnish-api/health.svg)

```
[![Health](https://phpackages.com/badges/webscale-networks-magento-varnish-api/health.svg)](https://phpackages.com/packages/webscale-networks-magento-varnish-api)
```

###  Alternatives

[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)[cheprasov/php-redis-client

Php client for Redis. It is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 6.0

1281.2M21](/packages/cheprasov-php-redis-client)[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
