anonymous-php/longlife-pdo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

anonymous-php/longlife-pdo

Composer 安装命令:

composer require anonymous-php/longlife-pdo

包简介

Longlife connections for looped applications

README 文档

README

This library will be helpful in case you are working with connections in workers or under process managers like PHP-PM. It provides the easiest way to stop to think about connection life cycle in looped applications.

Longlife Pdo provides an extension to the Aura.Sql library along with a reconnection and prepared statements cache.

Installation

composer require anonymous-php/longlife-pdo

Usage

<?php

use \Anonymous\Longlife\LonglifePdo;

$pdo = new LonglifePdo('mysql:host=127.0.0.1;dbname=test', 'test', 'test');

// To check connection in 60 seconds after the last connection usage
$pdo->setCheckConnectionTimeout(60);

// To use prepared statements cache and limit it with 100 items
$pdo->setStatementsCacheLimit(100);

Dependencies

This packages is just an extension for the Aura.Sql so check it's requirements:

This package requires PHP 5.6 or later; it has also been tested on PHP 7 and HHVM. We recommend using the latest available version of PHP as a matter of principle.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固