Download the PHP package cooltronicpl/varnishcache without Composer

On this page you can find all versions of the php package cooltronicpl/varnishcache. 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 varnishcache

CDN Cache & Preload Plugin for Craft CMS 4.x & 3.x & 5.0.0.alpha

With ❤️ CoolTRONIC.pl sp. z o.o. presents a caching helper solution written by Pawel Potacki. This plugin generates static HTML files from your dynamic CMS projects and purges the Varnish or/and Cloudflare cache, resulting in faster page load times and improved Core Web Vitals.

Table of Contents

Features

Installation

To install this plugin, copy the following command to your terminal:

You can also install the plugin directly from the Craft CMS plugin store.

Usage

This section provides detailed instructions and examples on how to use the CDN Cache & Preload to static HTML Helper Plugin.

Preloading Server Cache from Sitemap

The preloading of the server cache from the sitemap is initiated once the settings in the plugin options are enabled. The plugin adds the target URLs from the sitemap to a queue for preloading. However, if CraftCMS 4, 3, or 5 is not active, the next iteration of preload may be paused. After the next login to the admin panel, the preload cron will resume. This ensures that all your sites are continuously preloaded in the Varnish Server with PURGE and the static HTML Cache is recreated. For sites with long initial generation times, such as those generating PDFs with your plugin, the preload is initiated on the first website listed in the sitemap.xml. The duration between preloads can be adjusted from the default value of 60 minutes.

Configuring Varnish Cache

The plugin works out of the box and does not require special cache tags, unless you want to disable Varnish. If DevMode in Craft CMS is enabled, you will need to manually enable the plugin by activating the 'Force On' setting in the plugin. You can also exclude certain URL paths from generating HTML files.

Using Varnish Cache

Varnish Cache has a settings page where you can enable or disable it and flush the cache. If the plugin is working correctly, you will see the cached files in the storage/runtime/varnishcache/ folder. To check the performance improvement, please use the browser inspector. There, you will be able to see the improved loading times.

How to use Cloudflare with this plugin?

To use Cloudflare with this plugin, you need to enter your Cloudflare account details in the plugin settings. You need the following information:

After you enter your Cloudflare account details, you should test the connection to Cloudflare by clicking the “Test Cloudflare connection” button. If the connection is successful, you will see a notice that says “Cloudflare connection successful”. This means that the plugin can communicate with Cloudflare and clear the Cloudflare cache when you clear the Craft CMS cache.

Disabling or Clearing Some URL

To disable Varnish Cache for a specific page, you can disable this slug in the admin panel or prevent the creation of HTML files for the entire website using REGEX.

To clear a specific URL with Varnish and some linked HTML files, this is executed by the Craft Job Queue with a delay that you specify as the last argument in the clearCustomUrlUriTimeout function.

Example:

This command will clear the cache for the URL https://domain.com/test/ after a delay of 10 seconds.

FAQ

Q: Are all cache files deleted when updating an entry, or only the ones with a relation?

A: Only related cache files will be deleted and sites preloaded via Varnish after an update.

Q: The installation fails and plugin does not work.

A: Make sure that the folder storage/runtime/varniscache is created and there are read/write permissions.

Q: How to set Varnish Server?

A: You can use the vcl file from our project which contains a modified WordPress Purge mechanism for Craft CMS.

Q: Which branch should I install for my Craft CMS?

A: The versions since 2.6.0 is suitable for 3, 4, and 5.0.0.alpha. Supporteed Craft CMS 3 & 4 since 2.5.0, before that for Craft CMS 3.x it was used craft3 branch with versions 1.x, whereas the 2.x branch is for Craft CMS 4.

Q: My Preloading CRON failed. What could be the reason?

A: The failure could be due to the inaccessibility of the sitemap.xml file or poorly formatted entries within it. Please check the sitemap.xml file for any potential issues.

Q: Some URL Preloading failed?

A: If some URL preloading is failing, you can try to increase the preload time in the Preloading Tab. If the problem persists, consider disabling the preload for the affected page.

Q: How to reset Cache?

A: To reset the cache, navigate to the settings and enable the Purge all Cache now? option. Don't forget to click "Save" to apply the changes.

Q: What if the plugin's control panel settings don't match the screenshots?

A: You might need to clear the Craft CMS Cache. Navigate to the Utilities Tab, select Caches, and then click on Clear cache.

Support

If you encounter any issues or have questions about the plugin, please create an issue in the GitHub repository or contact us directly at [email protected].

Contribution

We welcome contributions to the CDN Cache & Preload to static HTML Helper plugin. Please read our contribution guidelines and submit your pull requests.

License

This project is licensed under the Craft License. See the LICENSE.md file for details.

Changelog

See the CHANGELOG.md file for a list of changes in each version of the plugin.


Copyright © CoolTRONIC.pl sp. z o.o.


All versions of varnishcache with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^5.0.0.alpha|^5.0.0-beta|~5.0|^4.0.0|^3.0.0
ext-curl Version *
ext-simplexml Version *
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 cooltronicpl/varnishcache contains the following files

Loading the files please wait ....