定制 microweber-packages/laravel-tagged-file-cache 二次开发

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

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

microweber-packages/laravel-tagged-file-cache

Composer 安装命令:

composer require microweber-packages/laravel-tagged-file-cache

包简介

Taggable File Cache driver for Laravel. Allows the use of Cache tags with a file cache.

README 文档

README

https://travis-ci.org/microweber-packages/laravel-tagged-file-cache

This package provides a custom file cache driver that supports Cache Tags for Laravel 6.x

Usage

This product is publicly available under the terms of the MIT license included in this repository.

Installation and Requirements

First, you'll need to require the package with Composer:

composer require microweber-packages/laravel-tagged-file-cache

Then, update config/app.php by adding an entry for the service provider.

'providers' => [
    // ...
    MicroweberPackages\Cache\TaggableFileCacheServiceProvider::class
];

Finally, add the necessary config to config\cache.php.

'default' => env('CACHE_DRIVER', 'file'),

'stores' => [

		'file' => [
			'driver' => 'file',
			'path'   => storage_path('framework/cache')
		],
		// ...
],

You are ready to use tag file caching..

$minutes = 1111 * 4;
$tags = ['people', 'cars', 'shamans'];
Cache::tags($tags)->put('name', 'John', $minutes);

$name = Cache::tags($tags)->get('name');
var_dump($name); // Output: John

// If you want to delete tags
Cache::tags($tags)->flush();

Optional Configuration

There are some optional config options available in the store definition above:

separator : defines the separator character or sequence to be used internally, this should be chosen to never collide with a key value. defaults to --- if omitted.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固