123456789101112131415161718192021222324252627 |
- <?php
- class CoRedisPool extends CoPool
- {
- const max_clients = 100;
- private static $stInstance = null;
- public static function instance()
- {
- if (self::$stInstance == null) {
- self::$stInstance = new CoRedisPool();
- }
- return self::$stInstance;
- }
- private function __construct()
- {
- parent::__construct(self::max_clients);
- }
- public function create_client($args)
- {
- return co_create_instance('Cache','connect',$args);
- }
- }
|