PHPackages                             x-graphql/schema-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. x-graphql/schema-cache

ActiveLibrary[Caching](/categories/caching)

x-graphql/schema-cache
======================

Caching GraphQL schema with PSR-16

0.1.1(2y ago)034.3k↓27.7%3MITPHPPHP &gt;=8.2

Since Apr 1Pushed 2y agoCompare

[ Source](https://github.com/x-graphql/schema-cache)[ Packagist](https://packagist.org/packages/x-graphql/schema-cache)[ RSS](/packages/x-graphql-schema-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (3)

Schema Cache
============

[](#schema-cache)

Save and lazy load [GraphQL Schema](https://webonyx.github.io/graphql-php/schema-definition/) from PSR-16 cache.

[![unit tests](https://github.com/x-graphql/schema-cache/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/x-graphql/schema-cache/actions/workflows/unit_tests.yml/badge.svg)[![codecov](https://camo.githubusercontent.com/375f6a5c5fe722cc759637efb9d4e689381736c587fa3594dfdf7451c2885fee/68747470733a2f2f636f6465636f762e696f2f67682f782d6772617068716c2f736368656d612d63616368652f67726170682f62616467652e7376673f746f6b656e3d633178434a7346764973)](https://codecov.io/gh/x-graphql/schema-cache)

Getting Started
---------------

[](#getting-started)

Install this package via [Composer](https://getcomposer.org)

```
composer require x-graphql/schema-cache symfony/cache
```

Usages
------

[](#usages)

Create an instance of `XGraphQL\SchemaCache\SchemaCache` with PSR-16 to save and load:

```
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Psr16Cache;
use XGraphQL\SchemaCache\SchemaCache;

$psr16 = new Psr16Cache(new ArrayAdapter());
$schemaCache = new SchemaCache($psr16);

$schemaCache->save(/* $schema */);

/// Lazy to load on another http requests

$schemaFromCache = $schemaCache->load();
```

Note

This package not support to decorate type after load schema from cache, you need to add type resolvers before execute schema.

Credits
-------

[](#credits)

Created by [Minh Vuong](https://github.com/vuongxuongminh)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

774d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8901d64a1059726b851dbdd91463ad1d3169f9dba6a2dcff11d05f97d9bccaea?d=identicon)[vuongxuongminh](/maintainers/vuongxuongminh)

---

Top Contributors

[![vuongxuongminh](https://avatars.githubusercontent.com/u/38932626?v=4)](https://github.com/vuongxuongminh "vuongxuongminh (7 commits)")

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/x-graphql-schema-cache/health.svg)

```
[![Health](https://phpackages.com/badges/x-graphql-schema-cache/health.svg)](https://phpackages.com/packages/x-graphql-schema-cache)
```

###  Alternatives

[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)[cache/adapter-common

Common classes for PSR-6 adapters

11124.4M38](/packages/cache-adapter-common)[cache/filesystem-adapter

A PSR-6 cache implementation using filesystem. This implementation supports tags

705.8M82](/packages/cache-filesystem-adapter)[cache/array-adapter

A PSR-6 cache implementation using a php array. This implementation supports tags

548.3M151](/packages/cache-array-adapter)[cache/redis-adapter

A PSR-6 cache implementation using Redis (PhpRedis). This implementation supports tags

523.9M27](/packages/cache-redis-adapter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
