Download the PHP package stfalcon-studio/doctrine-redis-cache-bundle without Composer

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

DoctrineRedisCacheBundle

:package: Add custom namespace for doctrine cache pools.

Scrutinizer Quality Score Build Status CodeCov License Latest Stable Version Total Downloads StyleCI

Problem Solved By This Bundle

When you use Redis as cache provider to store Doctrine query/metadata/result/second level cache, Doctrine generates unique keys for each cache item. When you change your database schema, create a new migration (Doctrine migration) and then deploy it to production, you have to clean your Doctrine cache after deploy. Doctrine has console commands to clean any type of cache and they work well. But if during the cache flushing, you have already running script (long running console/cron task or consumer) it still uses old schema info which can conflict with your new schema. In this case this script can regenerate cache (because it has been already flushed) with old schema metadata, query, result etc.

To prevent this problem, we add a custom namespace for each selected cache pool. This namespace is a name of the last migration version. For example, you deploy the first version of your project to production. Last migration version is 1 so all keys in cache will have prefix [1] (e.g. [1]hash_by_doctrine). Then you modify your schema, generate a new migration (version 2) and deploy it to production. Old running script will still use and generate keys with prefix [1], but new scripts will begin to use fresh prefix [2] and don't conflict with previous prefix.

After that you can stop or rerun old script. And after rerun they will use a new prefix and you can clean cache entries with the previous prefix.

Installation

Check the config/bundles.php file

By default Symfony Flex will add this bundle to the config/bundles.php file. But in case when you ignored contrib-recipe during bundle installation it would not be added. In this case add the bundle manually.

Example of possible cache pool configuration

Bundle configuration

Contributing

Read the CONTRIBUTING file.


All versions of doctrine-redis-cache-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-redis Version *
doctrine/doctrine-migrations-bundle Version ^3.2
symfony/cache Version ^7.0
symfony/config Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/framework-bundle Version ^7.0
symfony/http-kernel Version ^7.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 stfalcon-studio/doctrine-redis-cache-bundle contains the following files

Loading the files please wait ....