krisell/cosmos-cache-driver 问题修复 & 功能扩展

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

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

krisell/cosmos-cache-driver

Composer 安装命令:

composer require krisell/cosmos-cache-driver

包简介

CosmosDB cache driver for Laravel

README 文档

README

This package adds support to use Microsoft Azure CosmosDB as a cache driver for your Laravel project. It uses the MongoDB-API, so make sure you configure that on the Azure end.

Prerequisities

Make sure you have a driver for the mongodb connection installed, for instance jenssegers/mongodb. Note that you also need to enable the pecl extension for mongodb.

Configuration

Add the following configurations

database.php

'cosmos' => [
    'driver'   => 'mongodb',
    'database' => env('COSMOS_DATABASE'),
    'dsn' => env('COSMOS_CONNECTION'),
],

cache.php

'cosmos' => [
    'driver' => 'cosmos',
    'table' => env('COSMOS_TABLE', 'cache_'.config('app.env')),
],

So, in your .env, add

COSMOS_DATABASE=database_name
COSMOS_CONNECTION=database_connection_string (something like mongodb://)
COSMOS_TABLE=table_name (optional, defaults to cache_{{env}})

The database and table are created automatically by CosmosDB.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固