Skip to content

Cache integration with the Memento caching library for Symfony2 and the Perimeter API Gateway

License

Notifications You must be signed in to change notification settings

chieuvan9283/CacheBundle

 
 

Repository files navigation

Perimeter CacheBundle

Build Status

A Symfony Bundle that wraps the memento caching library and provides an extensible interface for integration with the Perimeter API Gateway.

Usage

You can access the memento caching library using the service container

// get the cache client
$memento = $container->get('memento.client');

Or you can use the perimeter caching service, which implements Perimeter\CacheBundle\Cache\CacheServiceInterface in order to be interchangeable with other caching services.

Prefixes

The perimeter.cache service also supports cache prefixes, which can be important when deploying to multiple environments:

Production config

<!-- Resources/config/services_prod.xml -->
<parameter id="perimeter.cache.prefix">prod</parameter>

Beta config

<!-- Resources/config/services_beta.xml -->
<parameter id="perimeter.cache.prefix>">beta</parameter>

This will ensure that if your cache engine is shared across environments (i.e. beta and prod share memcache or redis instances) the caching does not collide.

About

Cache integration with the Memento caching library for Symfony2 and the Perimeter API Gateway

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%