cakedc/cakephp-compress-cache

CompressCache plugin for CakePHP

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:cakephp-plugin

pkg:composer/cakedc/cakephp-compress-cache

2.0.0 2025-09-05 10:57 UTC

This package is auto-updated.

Last update: 2025-10-03 15:25:04 UTC


README

Versions and branches

CakePHP CakeDC Compress Cache Plugin Tag Notes
^5.0 2.0.0 2.0.0 stable
^4.5 1.0.0 1.0.0 stable

Overview

The CakeDC Compress Cache Plugin adds the ability to compress the content of the cache.

Requirements

  • CakePHP 4.5
  • PHP 8.1+

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer package is:

composer require cakedc/cakephp-compress-cache

Next, load the plugin by running the following command:

bin/cake plugin load CakeDC/CompressCache

Configuration

To configure the cache to use the Compressed Cache Engine, create a configuration similar to the one below in your config/app.php file. Include the configuration for your target cache engine in the wrapped key.

// ...
    'Cache' => [
        // ...

        'your_cache_configuration' => [
            'className' => \CakeDC\CompressCache\Cache\Engine\CompressEngine::class,
            'wrapped' => [
                'className' => \Cake\Cache\Engine\FileEngine::class,
                'prefix' => 'myapp_your_cache_configuration_',
                'path' => CACHE ,
                'serialize' => true,
                'duration' => '+1 years',
                'url' => env('CACHE_YOUR_CACHE_CONFIGURATION_URL', null),
            ],
            'duration' => '+24 hours',
        ],

        // ...
    ],
// ...

The Compressed Cache Engine will compress data before storing it in the cache and decompress it when reading it from the cache.