kozz/laravel-doctrine-cache

Doctrine Cache Factory for Laravel 5
9,513 2
Install
composer require kozz/laravel-doctrine-cache
Latest Version:1.0.0
PHP:>=5.4.0
Laravel:5
License:MIT
Last Updated:May 20, 2015
Links: GitHub  ·  Packagist
Maintainer: urakozz

Laravel Docrtine Cache Proxy

Build Status Code Climate Test Coverage Latest Stable Version Latest Unstable Version License

Laravel Proxy to Doctrine Cache

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

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

Examples

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

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

Related Packages

bunkuris/has-cache

HasCache trait for Laravel models with cache key managers

3,551 0
silber/page-cache

Caches responses as static files on disk for lightning fast page loads.

515,581 1,259
oskarstark/doctrine-postgres-public-schema-listener

An migration EventSubscriber which ensures public namespace is only added if nee...

130,115 1
laracasts/matryoshka

Russian Doll Caching for Laravel.

60,973 237
geekcache/geekcache

A wrapper for Memcached with tags, soft invalidation, memoization, and regenerat...

38,858 6

Version History

Version Released PHP Laravel License
1.0.0 >=5.4.0 ~5.0 MIT