Download the PHP package xwp/block-visibility-edge-cache without Composer

On this page you can find all versions of the php package xwp/block-visibility-edge-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package block-visibility-edge-cache

Block Visibility Edge Cache

Test

A WordPress plugin that integrates the Block Visibility plugin with WordPress.com VIP edge caching. It ensures that edge caches are automatically purged at the exact moment a block's visibility is scheduled to change.

How it Works

When using edge caching, page content is cached at the "edge" (servers closer to the user). Traditional "Date/Time" visibility rules in the Block Visibility plugin usually rely on PHP executing during the page load to decide whether to show or hide a block. With edge caching, PHP might not run for every request, leading to stale content being served even after a visibility transition should have occurred.

This plugin solves this by:

  1. Parsing the blocks in a post when it is saved or published.
  2. Calculating all future "transition" timestamps (when a block should appear or disappear) based on the Date/Time settings.
  3. Scheduling background tasks using Action Scheduler to purge the post's edge cache at those specific timestamps.

Requirements

Installation

Via Composer (Recommended)

Manual

  1. Upload the plugin folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Ensure the Block Visibility plugin is also active.

Supported Visibility Controls

To maintain compatibility with edge caching, only time-based visibility controls are supported:

Disabled Controls

The following controls are automatically disabled because they depend on dynamic request data (visitor-specific) which is incompatible with static edge caching:

Developer Hooks

xwp_block_visibility_edge_cache_purged

Triggered after a post's edge cache has been purged. Useful for adding custom purging logic for other cache layers.

Local Development & Testing

Installation

Running Tests

The project includes a comprehensive test suite using PHPUnit via wp-env.

License

GPLv2 or later.


All versions of block-visibility-edge-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
woocommerce/action-scheduler Version ^3.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xwp/block-visibility-edge-cache contains the following files

Loading the files please wait ...