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)041.7k↓12.6%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 2d 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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

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

821d 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

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[illuminate/contracts

The Illuminate Contracts package.

706130.3M13.3k](/packages/illuminate-contracts)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[thecodingmachine/graphqlite

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

5733.3M47](/packages/thecodingmachine-graphqlite)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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