Download the PHP package wieni/wmpage_cache without Composer

On this page you can find all versions of the php package wieni/wmpage_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 wmpage_cache

Page Cache

Latest Stable Version Total Downloads License

Caches pages for anonymous users, with more customisability than the default page cache module.

Why?

Installation

This package requires PHP 7.1 and Drupal 8 or higher. It can be installed using Composer:

To prevent unnecessary early rendering issues when creating custom controllers, a patch from the following issue should be included:

#2638686: Exception in EarlyRenderingControllerWrapperSubscriber is a DX nightmare, remove it

How does it work?

Configuring the module

Settings can be changed through container parameters. Check wmpage_cache.services.yml for a list of settings, what they do and their default values.

About cacheability metadata

Just like the Internal Page Cache & Dynamic Page Cache core modules, this module uses cacheability metadata (cache tags, cache contexts and max-age) to determine the cacheability of a request and to make sure cached pages are invalidated when necessary.

Adding cacheable metadata from a controller

There are a bunch of different things you can return in a controller and cacheable metadata can be included in pretty much every one of them.

Render arrays

Cacheability metadata can be included in a render array under the #cache key. For more information, please refer to the official documentation.

Response objects

Cacheable Response objects have to implement CacheableResponseInterface and can use the CacheableResponseTrait. For more information, please refer to the official documentation.

wmcontroller ViewBuilder

When rendering a Twig template, eg. by using the wmcontroller ViewBuilder, all cacheable metadata of parameters that are passed to the template are automatically included.

Adding cacheable metadata from a Twig extension

If a Twig extension is returning information that will be used in a Twig template, without going through the Drupal render system, any cacheability metadata will be lost. That's why it's better to dispatch cacheability metadata in the logic of the Twig extension. You can do this by attaching the metadata to an empty render array and rendering it:

In case this Twig extension is called often, this can impact performance. Another option is to collect all metadata until the end of page rendering, and attach it once in a hook_page_attachments implementation.

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

Distributed under the MIT License. See the LICENSE file for more information.


All versions of wmpage_cache with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
drupal/core Version ^9 || ^10
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 wieni/wmpage_cache contains the following files

Loading the files please wait ....