PHPackages                             kozz/laravel-doctrine-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. [Database &amp; ORM](/categories/database)
4. /
5. kozz/laravel-doctrine-cache

ActiveLibrary[Database &amp; ORM](/categories/database)

kozz/laravel-doctrine-cache
===========================

Doctrine Cache Factory for Laravel 5

1.0.0(11y ago)29.5kMITPHPPHP &gt;=5.4.0

Since May 20Pushed 11y ago2 watchersCompare

[ Source](https://github.com/urakozz/php-laravel-docrtine-cache)[ Packagist](https://packagist.org/packages/kozz/laravel-doctrine-cache)[ Docs](https://github.com/urakozz/php-laravel-doctrine-cache)[ RSS](/packages/kozz-laravel-doctrine-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel Docrtine Cache Proxy
============================

[](#laravel-docrtine-cache-proxy)

[![Build Status](https://camo.githubusercontent.com/4ec414067f59abb509fe2e5bfb2cfe2a059e5215768e427a879ea40a065ebecc/68747470733a2f2f7472617669732d63692e6f72672f7572616b6f7a7a2f7068702d6c61726176656c2d646f637274696e652d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/urakozz/php-laravel-docrtine-cache)[![Code Climate](https://camo.githubusercontent.com/c66c34f5024f74ce5d18ed22884be9a4f0baa8066b232e481f989232556695b6/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7572616b6f7a7a2f7068702d6c61726176656c2d646f637274696e652d63616368652f6261646765732f6770612e737667)](https://codeclimate.com/github/urakozz/php-laravel-docrtine-cache)[![Test Coverage](https://camo.githubusercontent.com/6e968921d6e41b21d846209127513cdf3bb29f4790aea3a7734f05e35fdaf745/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7572616b6f7a7a2f7068702d6c61726176656c2d646f637274696e652d63616368652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/urakozz/php-laravel-docrtine-cache/coverage)[![Latest Stable Version](https://camo.githubusercontent.com/36af37de0e6b76dc5e60b12daa92abdd1d0339c4255427a645ee37c07c59ada5/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7a7a2f6c61726176656c2d646f637472696e652d63616368652f762f737461626c652e737667)](https://packagist.org/packages/kozz/laravel-doctrine-cache)[![Latest Unstable Version](https://camo.githubusercontent.com/4b1d2107262e48e1fcffe39af71634d22c43352007e7ec70160634e0ce402c94/68747470733a2f2f706f7365722e707567782e6f72672f6b6f7a7a2f6c61726176656c2d646f637472696e652d63616368652f762f756e737461626c652e737667)](https://packagist.org/packages/kozz/laravel-doctrine-cache)[![License](https://camo.githubusercontent.com/1379c3d63fed2bfbcf565f0083192ee07792ecae098692fe9ed05ea2b4fa936a/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b6f7a7a2f6c61726176656c2d646f637472696e652d63616368652e737667)](https://packagist.org/packages/kozz/laravel-doctrine-cache)

Laravel Proxy to Doctrine Cache

### When to use

[](#when-to-use)

`LaravelDoctrineCache` implements `Doctrine\Common\Cache\Cache` interface so it's fully compatible with all libraries that are requiring Doctrine Cache such as:

- Doctrine Annotation Reader
- Symfony Validator
- JMS Serializer

### How does it work

[](#how-does-it-work)

`LaravelDoctrineCache` is using cache from app container : `Container::getInstance()->offsetGet('cache')` and points `Doctrine\Common\Cache\Cache` methods to suitable Laravel Cache methods

### Examples

[](#examples)

```
#JMS\Serializer
$serializer = \JMS\Serializer\SerializerBuilder::create()
  ->setAnnotationReader(new CachedReader(new AnnotationReader(), new LaravelDoctrineCache()))
  ->build();
```

### Reference

[](#reference)

Methods

`fetch($id)` - Fetches an entry from the cache

`contains($id)` - Test if an entry exists in the cache

`save($id, $data, $lifeTime = false)` - Puts data into the cache

`delete($id)` - Deletes a cache entry

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

4017d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f78e5a1e5128b31ba7dfedcc9a3ccfbc4852f5df1b79a54867aa377169968a1?d=identicon)[urakozz](/maintainers/urakozz)

---

Top Contributors

[![urakozz](https://avatars.githubusercontent.com/u/5797393?v=4)](https://github.com/urakozz "urakozz (14 commits)")

---

Tags

laraveldoctrinecache

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kozz-laravel-doctrine-cache/health.svg)

```
[![Health](https://phpackages.com/badges/kozz-laravel-doctrine-cache/health.svg)](https://phpackages.com/packages/kozz-laravel-doctrine-cache)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[mostafaznv/laracache

LaraCache is a customizable cache trait to cache queries on model's events

27246.8k1](/packages/mostafaznv-laracache)[cache/doctrine-adapter

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

151.0M21](/packages/cache-doctrine-adapter)[cache/psr-6-doctrine-bridge

PSR-6 Doctrine bridge

151.0M4](/packages/cache-psr-6-doctrine-bridge)[kdyby/doctrine-cache

Doctrine Cache bridge for Nette Framework

101.3M19](/packages/kdyby-doctrine-cache)[adobrovolsky97/laravel-repository-service-pattern

Laravel 5|6|7|8|9|10 - Repository - Service Pattern

275.4k](/packages/adobrovolsky97-laravel-repository-service-pattern)

PHPackages © 2026

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