Download the PHP package contenir/contenir-page-cache without Composer

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

contenir/contenir-page-cache

Formerly contenir/cache and contenir/contenir-cache; this package replaces both, and the namespace is now Contenir\PageCache\. See UPGRADE-page-cache.md.

Continuous Integration codecov

Framework-agnostic page-cache control for Contenir CMS.

The CMS lets an operator toggle page caching on or off, decide which request signals participate in cache-key generation (query/post/session/files/cookie), and exclude specific URL patterns. The consuming Site (Mezzio, Laminas MVC, anything else) reads those settings on every request and applies them in its caching layer.

This package provides the domain — an immutable state value plus a repository interface, with file-based and in-memory implementations. Framework-specific listeners come from sibling packages (e.g. contenir/contenir-cache-laminas-mvc).

Install

Requires PHP 8.3, 8.4 or 8.5. The 0.x releases, which support PHP 8.1, remain available from the 0.x branch and v0.* tags; see UPGRADE-2.0.md.

contenir/contenir-config (^2.1), which Repository\FileRepository uses to read and write the state file, is installed with it.

Usage

The public API is four types:

Type Purpose
CacheControl Immutable state: bool $enabled, array $options, array $routes. CacheControl::enabled() and CacheControl::disabled() build the empty variants.
CacheControlRepositoryInterface get(): CacheControl and save(CacheControl): void. get() never throws; save() throws RuntimeException when state cannot be persisted.
Repository\FileRepository Reads and writes a PHP-array config file (via contenir/contenir-config).
Repository\LayeredFileRepository Reads the admin's file on every get() and lays it over the site's defaults; a setting absent from the file inherits the default. Used by the framework adapters.
Repository\InMemoryRepository Holds state in memory, for tests. Starts disabled unless given an initial state.

Reading state

Writing state (admin)

File format

FileRepository reads and writes a PHP file under the pagecache namespace, so the same file can be merged directly into a Laminas/Mezzio site config:

A missing or unreadable file resolves to disabled state with empty options and routes, so first-run consumers never serve cached content before the admin has explicitly opted in. When reading, pagecache.options.cache becomes $enabled and is removed from $options; option entries without a string name, and route entries that are not a pattern => [options] pair, are skipped.

On save:

Testing

InMemoryRepository is shipped in src/ so consumers can use it in their own test suites:

Development

The QA toolchain is contenir/contenir-qa-tools. Mago is a standalone binary, installed separately (brew install mago).

License

MIT. See LICENSE.


All versions of contenir-page-cache with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3.0 || ~8.4.0 || ~8.5.0
contenir/contenir-config Version ^2.1
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 contenir/contenir-page-cache contains the following files

Loading the files please wait ...