定制 tyrola/redis-session-handler-bundle 二次开发

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

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

tyrola/redis-session-handler-bundle

最新稳定版本:1.1

Composer 安装命令:

composer require tyrola/redis-session-handler-bundle

包简介

Symfony2 Redis Session Handler Bundle

README 文档

README

Prerequisites

  • Symfony 2.1 or newer
  • PHP 5.4 or newer
  • PHP PhpRedis extension

Installation

Installation is a quick 3 steps process:

  1. Install RedisSessionHandlerBundle
  2. Enable the bundle
  3. Update your config

Step 1: Install RedisSessionHandlerBundle

The preferred way to install this bundle is to rely on Composer. Just check on Packagist the version you want to install (in the following example, we used "dev-master") and add it to your composer.json:

{
    "require": {
        // ...
        "tyrola/redis-session-handler-bundle": "1.1"
    }
}

Step 2: Enable the bundle

Open up the AppKernel.php file and add the bundle to the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new BirknerAlex\RedisSessionHandlerBundle\RedisSessionHandlerBundle(),
    );
}

Step 3: Update your config

Open the app/config/config.yml File and add these following lines:

# app/config/config.yml

framework:
    session:
        handler_id:  redis.session.handler

redis_session_handler:
    class: BirknerAlex\RedisSessionHandlerBundle\Session\Storage\Handler\RedisSessionHandler
    host: "127.0.0.1" # Your redis hostname
    port: 6379 # Your redis port
    database: 0 # Your redis database id (Default is 0)
    db_options: ~

You're done!

Optional: More configuration

# app/config/config.yml
redis_session_handler:
    password: "MySecretPassword" # Provide a password if requirepass is enabled
    db_options:
        expiretime: 1800 # Session lifetime in seconds
        prefix: "session_" # Custom prefix for sessions

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-01-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固