承接 haydarsahin/cache-migration 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

haydarsahin/cache-migration

最新稳定版本:v1.0.1

Composer 安装命令:

composer require haydarsahin/cache-migration

包简介

The package helpful about migrate redis cache for seamless deploys

README 文档

README

The package is developed for make seamless deploys. You can delete your cache by adding the desired redis keys to the migration file.

Requirement

  • Laravel >= 5.x
  • PHP >= 7.1

Installation

Install via composer

composer require haydarsahin/cache-migration

Run migration for creating cache-migrations table.

php artisan migrate

Usage

The cache migrations is analogous with normal migration.

Create a migration file.

php artisan make:cache-migration UsersCacheForget

Type pattern or patterns which you want to forget to patterns array.

<?php

class UserCacheForget
{

   /*
   |--------------------------------------------------------------------------
   | Cache Migration File
   |--------------------------------------------------------------------------
   |
   | Redis keys that you wish to clear should be added to the patterns array.
   | Invalid patterns: '*', less than 3 characters.
   |
   */

    public $patterns = [
        'users:*',
        'report:users:*:performance:*:dateRange:*:volumes',
        'specificCacheKey:101:userId'
    ];
}

Run pending migrations manually or add this code to your deployment pipeline.

php artisan cache:migrate

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please email instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-02