juampi92/artisan-cache-debug

Simple artisan command to debug your redis cache
7,124 17
Install
composer require juampi92/artisan-cache-debug
Latest Version:v1.2
PHP:^8.1
Laravel:9 · 10
License:MIT
Last Updated:Oct 9, 2023
Links: GitHub  ·  Packagist
Maintainer: juampi92

🔎 php artisan cache:debug

Simple artisan command to debug your redis cache

🚀 Installation

You can install the package via composer:

composer require juampi92/artisan-cache-debug --dev

If you would like to debug the cache in production, you can install it without the --dev flag.

Usage

The simplest usage:

php artisan cache:debug

Options

Option / Flag Description
--key=* Will filter the keys. Can use wildcard. Example: --key=*:translations. Read more
--heavier-than[=HEAVIER-THAN] Will hide keys lighter than X. Use a format like 10bytes, 1kb, 8b
--sort-by[=SORT-BY] Will sort the keys by size or key. [default: "size"]
--sort-dir[=SORT-DIR] Set the sorting direction: asc or desc.
--forever Will only show non-expiring keys.
--with-details Show the type of every cache record.
--store= In case you want to debug a cache store other than the default.

Testing

sail up -d
composer test

Contributing

Please see CONTRIBUTING for details.

To-do

Some ideas to expand this package:

  • Pagination
  • Filter on type
  • Display the TTL (currently can't make it fit in the results)
  • Support memcache?

Changelog

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

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
v1.2 ^8.1 ^9.21|^10.0 MIT
v1.1 ^8.1 ^9.21 MIT
v1.0 ^8.1 ^9.21 MIT