Download the PHP package itkg/combinedhttpcache without Composer

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

README

About

This library provides integration of distributed HttpCache based on HttpCache Symfony component on Redis storage.

Installation

Add the library to your project thanks to composer:

Integrate in Symfony

Edit app/AppCache.php to change HttpCache base class :

Then change for testing in dev environment the web/app_dev.php.

Please note you have to push correct Redis configuration string as a second argument of AppCache constructor.

If everything works correctly, cache can then be activated for 'prod' environment. For that, just uncomment the code lines that Symfony keeps in comment to activate the cache.

Using cache

From that point, cache annotations or explicit cache settings for a Response will be managed to make storage of the current request (or ESI request) in conformity to URL unicity and Vary headers.

See :

Manage tagging for cached requests

Any request can be cached (if needed of course) and any cached request can be tagged. To rely on the same conventions has been the choice to manage tagging. For example, it will ease the process to move to Varnish even for the projects relying at the moment on this Redis version of HttpCache.

The library expects meta data tagging in responses by positionning X-ITKG-Cache-Tags. Tags must be separated thanks to ',' character. Each tag name is trimmed in case space-like characters are present (when splitting the header on comas).

Note :

Internal design

The cache storage is managed in two places:

Note 1 : The double storage for content digest is quite handy because it keeps the reliability and speed for ESI management like the standard HttpCache that deals with a PHP include strategy to avoid unserialiazation and get benefits of standard opcode cache.

Note 2 : Opcode cache needs however correct memory settings because it must mostly avoid evicting cache entries to be efficient.

A default configuration value can be done however for starting.

In bash it becomes:

In case (for ITKG it is the case), the best is to measure memory usage thanks to APC.php script to see how it behaves.

For simple invalidation out of Symfony

A specific integration is possible for backend responsible of blocks configuration hence the need of invalidation.

Then the client can be used this way:

Note : manual key set/get/del should not be performed here because key hashing is a very complex task that only HttpCache should manage.

License

See LICENSE file


All versions of combinedhttpcache with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.9
ext-redis Version ^2.2
symfony/http-kernel Version ^2.7
symfony/framework-bundle Version ^2.7
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 itkg/combinedhttpcache contains the following files

Loading the files please wait ....