定制 werkint/memcached-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

werkint/memcached-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require werkint/memcached-bundle

包简介

Bundle providing Memcached (namespaced) for services via tags

README 文档

README

Bundle providing Memcached (namespaced) for services via tags

This bundle allows separation of services with namespaces. You tag each service which use Memcached, so when the container is being compiled, each service get an instance of doctrine cache provider with corresponding namespace set. Also this bundle helps store sessions in namespaces.

Also notice, that full namespace for services would be something like "company_dev_theservice_", so you even can have multiple instances of project running on the machine at the same time.

Configuration

framework:
    ...
    session:
        handler_id: werkint.memcached.session
werkint_memcached:
    host:   localhost
    port:   11211
    prefix: company_%kernel.environment%
    session:
        prefix: company_%kernel.environment%_sess
        expire: 3600

Adding tagged services (namespace: "theservice")

services:
    company.service:
        class: Company\MainBundle\Service\Service
        arguments:
            ...
            - @werkint.memcached.ns.theservice
        tags:
            - { name: werkint.memcached.cacher, ns: theservice }
<?php
namespace Company\MainBundle\Service;

use Doctrine\Common\Cache\CacheProvider;

class Service
{
    protected $cacher;

    public function __construct(
        CacheProvider $cacher
    ) {
        $this->cacher = $cacher;
    }

    // You now can use doctrine cache provider as usual

}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: own
  • 更新时间: 2012-12-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固