Download the PHP package zfcampus/zf-http-cache without Composer

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

ZF Http Cache

Repository abandoned 2019-12-31

This repository has moved to laminas-api-tools/api-tools-http-cache.

Build Status Coverage Status

Introduction

zf-http-cache is a ZF2 module for automating http-cache tasks within a Zend Framework 2 application.

Installation

Run the following composer command:

Alternately, manually add the following to your composer.json, in the require section:

And then run composer update to ensure the module is installed.

Finally, add the module name to your project's config/application.config.php under the modules key:

Configuration

User Configuration

As a rule of thumb, avoid as much as possible using anonymous functions since it prevents you from caching your configuration.

The top-level configuration key for user configuration of this module is zf-http-cache.

The config/module.config.php file contains a self-explanative example of configuration.

Key: controllers

The controllers key is utilized for mapping any of

Each is case sensitive, and will map one or more HTTP methods to the cache header configuration specific to the given rule.

Example:

Key: <controller>

Either

A wildcard matches any unspecified controllers.

Key: <http-method>

Either a lower cased HTTP method (get, post, etc.) (as returned by Zend\Http\Request::getMethod()) or a wildcard.

A wildcard stands for all the non-specified HTTP methods.

Key: <cache-header-name>

An HTTP cache header name (Cache-control, expires, etag etc.).

ETags

For ETags you can specify a custom generator in the configuration:

A generator example can be found in \ZF\HttpCache\DefaultETagGenerator.

Key: <cache-header-value>

The value for the cache header.

Key: override

Whether to override the cache headers possibly sent by your application.

Key: enable

The enable key is utilized for enabling/disabling the http cache module at run time.

If you no longer need this module, rather consider removing the module from the application.config.php list.

Caution: when disabled, http cache module doesn't override/remove the cache headers sent by your application.

Example:

Key: http_codes_black_list

The http_codes_black_list is utilized to avoid caching the responses with the listed HTTP status codes. Defaults to all others than 200.

Example:

Key: regex_delimiter

This key is used to enable the evaluation of the key as a regular expression.

It must contain the delimiter of the regular expression.

If you don't want to use regular expression in your configuration set this to null to avoid inutil parsing.

Regular expressions are tested in the very order they appear in the configuration, first matching wins.

Regexp wins over wildcard.

Caution: When this value is not empty and no litteral key corresponds to the current controller, a preg_match is used.

Example:

System Configuration

The following configuration is provided in config/module.config.php:

ZF2 Events

Listeners

ZF\HttpCache\HttpCacheListener

This listener is attached to the MvcEvent::EVENT_ROUTE and MvcEvent::EVENT_FINISH events with the low priority of -10000.


All versions of zf-http-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
zendframework/zend-eventmanager Version ^2.6.3 || ^3.0.1
zendframework/zend-http Version ^2.5.4
zendframework/zend-mvc Version ^2.7.15 || ^3.0.2
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 zfcampus/zf-http-cache contains the following files

Loading the files please wait ....