Download the PHP package szmnmichalowski/doctrine-cache-toolbar without Composer

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

DoctrineCacheToolbar

Build Status Code Coverage

DoctrineCacheToolbar is a Zend Framework 2/3 module which is integrated with Doctrine 2.
It does show statistics for regions while Second Level Cache is enabled in doctrine's configuration

Statistics in DoctrineCacheToolbar

Installation

You can install this module by cloning this project into your ./vendor/ directory, or using composer, which is more recommended:
1. Add this project into your composer.json

2. Update your dependencies

3. Add module to your application.config.php. It requires DoctrineModule, DoctrineORMModule and ZendDeveloperTools.

Usage

This module does NOT need any configuration to work. It will show statistics for cache regions if you have Second Level Cache enabled.

What is a Second Level Cache?

Second Level Cache is a Doctrine's feature added in version 2.5. It allows to cache entity with their associations. More information you can find on Doctrine's website http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/second-level-cache.html

How to configure Second Level Cache in Zend Framework 2/3?

Add following code to Doctrine's configuration file:

'doctrine' => [
    'configuration' => [
        'orm_default' => [
            'metadata_cache'    => 'filesystem', // name of cache adapter
            'query_cache'       => 'filesystem', // name of cache adapter
            'result_cache'      => 'filesystem', // name of cache adapter
            'hydration_cache'   => 'filesystem', // name of cache adapter
            'second_level_cache' => [
                'enabled'               => true,
                'default_lifetime'      => 300,
                'default_lock_lifetime' => 300,
                'file_lock_region_directory' => __DIR__.'../../data/cache',
            ]
        ]
    ]
]

You can also define regions and lifetime for each of them. Add following array inside second_level_cache index:

'regions' => [
    'my_region_name' => [
        'lifetime' => 100,
        'lock_lifetime' => 200
    ],
]

Then, in your entity add:

namespace Application\Entity;

use Doctrine\ORM\Mapping AS ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="app_post")
 * @ORM\Cache("NONSTRICT_READ_WRITE", region="my_region_name")
 */
class Post
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=40, nullable=false)
     */
    private $title;
}

From now toolbar should show statistics similar to this one on image above.


All versions of doctrine-cache-toolbar with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
doctrine/doctrine-orm-module Version 1.1.1
zendframework/zend-developer-tools Version ^1.0.0 || ^1.1.0
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 szmnmichalowski/doctrine-cache-toolbar contains the following files

Loading the files please wait ....