定制 jhdxr/laravel-prune-db-cache 二次开发

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

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

jhdxr/laravel-prune-db-cache

最新稳定版本:v0.0.3

Composer 安装命令:

composer require jhdxr/laravel-prune-db-cache

包简介

Clear expired cache items in DB for laravel database driver

README 文档

README

Latest Stable Version License

Prune Expired Cache For Laravel DB Driver

The built-in database cache driver in Laravel does not have a built-in way to delete expired cache entries automatically, nor a quick way to clear the expired items only. This package helps you to handle this issue.

This package adds one artisan command: php artisan cache:db-prune-expired and it will delete all expired records from the cache table.

Installation

You can install the package via composer:

composer require jhdxr/laravel-prune-db-cache

Usage

Run the following command

php artisan cache:db-prune-expired

Run on schedule

It's very easy to use Laravel's built-in scheduler to run the command automatically. For example, if you want to run the command every day at 4 AM, you can add the following to your app/Console/Kernel.php file:

protected function schedule(Schedule $schedule)
{
    $schedule->command('cache:db-prune-expired')->dailyAt('04:00');
}

License

This package is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固