Drupal is a registered trademark of Dries Buytaert
drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! views_data_export 8.x-1.10 Minor update available for module views_data_export (8.x-1.10). linkit 7.0.14 Minor update available for module linkit (7.0.14). migrate_tools 6.1.4 Minor update available for module migrate_tools (6.1.4). diff 2.0.0 Major update available for module diff (2.0.0). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). file_upload_secure_validator 2.1.1 Minor update available for module file_upload_secure_validator (2.1.1).

Provides a Symfony Cache adapter to the Drupal cache system.

It's useful when a third-party library requires a php-cache style adapter to cache data, but you want to pipe the caching process through the Drupal cache API.

A good example is KnpLabs/php-github-api, a library querying the GitHub API. Calls to GitHub might be cached but the library requires a php-cache adapter. You can use the DrupalPhpCacheAdapter provided by this package, to route the cache write/read via Drupal caching API. See https://github.com/KnpLabs/php-github-api/blob/master/doc/caching.md.

Install with Composer


composer require drupal/php_cache_adapter 

Usage

use Drupal\SymfonyCacheAdapter\DrupalPhpCacheAdapter;
use ThirdParty\Library\Client;

class SomeService {
  public function doSomething() {
    $client = new Client(...);
    $adapter = new DrupalPhpCacheAdapter(\Drupal::service('cache.data'));
    $client->addCacheBackend($adapter);
    $client->fetch();
    ...
  }
}

Activity

Total releases
4
First release
May 2026
Latest release
11 hours ago
Release cadence
0 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-alpha4 Pre-release May 15, 2026
1.0.0-alpha3 Pre-release May 15, 2026
1.0.0-alpha2 Pre-release May 15, 2026
1.x-dev Dev May 15, 2026