承接 igniter/elasticache-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

igniter/elasticache-bundle

最新稳定版本:0.2.2

Composer 安装命令:

composer require igniter/elasticache-bundle

包简介

An ElastiCache Bundle for Symfony.

README 文档

README

An ElastiCache Bundle for Symfony. This could also be used for Redis Clusters that aren't in ElastiCache as well. To that end, we use typical "master" and "slave" nomenclature instead of ElastiCache's "primary" and "read" node names.

Codeship Status for ShopIgniter/ElastiCacheBundle Coverage Status

Installation

To enable the RedisCache service, add your servers to your parameters.yml.

parameters:
    # ...
    cache.redis.servers:
        - { host: primary-write.ng.amazonaws.example.com, port: 6379, master: true, timeout: 5 }
        - { host: primary-read.amazonaws.example.com, port: 6379, timeout: 5 }
        - { host: read-1.amazonaws.example.com, port: 6379, timeout: 5 }

Notes

The Master host and port come from ElastiCache's Replication Group Primary Endpoint. Do not use the node's endpoint for writing. Likewise, do not use the Replication Group's Primary Endpoint as a read server. Instead use the primary node's endpoint for reading.

Usage

To use directly, grab the service from the container.

/** @var \Igniter\ElastiCacheBundle\Cache\RedisCache $cache */
$cache = $this->get('igniter.elasticache.rediscache');
$bar = $cache->fetch('foo');
// ...
$cache->save('foo', $bar);

To use as a Doctrine Custom Cache Provider, use the following in your config. Using aliases, you can also retrieve the service by this alias out of the container.

doctrine_cache:
    aliases:
        cache: my_provider
    custom_providers:
        igniter.elasticache:
            prototype:  "igniter.elasticache.rediscache"
            definition_class: "Igniter\ElastiCacheBundle\DependencyInjection\Definition\RedisCacheDefinition"
    providers:
        my_provider:
            igniter.elasticache:
                namespace: "foo"

ToDo

统计信息

  • 总下载量: 4.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 9
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固