- How do I install vink/nova-cache-card in Laravel Nova?
- Install it with composer require vink/nova-cache-card, then register the card by adding new CacheCard() to the cards() array in your app/Nova/NovaServiceProvider.php. You may also need to publish the package assets so the Vue component is available to the Nova front end. Note that the shipped release dates from February 2019, so on modern Laravel and Nova versions Composer may refuse to resolve it at all.
- Does vink/nova-cache-card support Nova 4, Nova 5, Laravel 10 and Laravel 11?
- No. The last tagged release is from February 2019, which pins it to roughly Nova 1.x/2.x, Laravel 5.7/5.8 and PHP 7.1 to 7.3. It was built with Vue 2 and Laravel Mix, so it will not mount under the Vite plus Vue 3 asset pipeline used by current Nova releases. Treat the package as a reference implementation rather than a drop-in dependency on a modern stack.
- How do I register the cache card in NovaServiceProvider?
- Add the card to the cards() method of app/Nova/NovaServiceProvider.php, for example return [new CacheCard()]; alongside your other dashboard cards. The package has essentially no configuration file, so card registration is the whole setup. Any environment-specific behaviour, such as hiding the card in production, has to be added by you rather than configured.
- What does the Nova cache card actually display?
- The card shows the active cache driver or store plus basic cache configuration and key stats at a glance on the Nova dashboard. It is a lightweight status and action widget, not a monitoring tool, so it does not chart hit rates, memory usage or key counts over time. If your real requirement is understanding cache state rather than clearing it, you will need something else.
- Is the one-click cache clear safe to run in production?
- Be careful. The action maps to Laravel's cache flushing behaviour, and on a shared Redis database Cache::flush() can wipe sessions, queued jobs, Horizon metrics and rate-limit counters, not just application cache. Before using it anywhere near production, bind the flush to a dedicated cache store and add an explicit environment guard in the route handler rather than relying on the UI. Otherwise this is a production outage vector disguised as a convenience button.
- Who is allowed to clear the cache with this card?
- That depends entirely on the middleware stack on the route the package ships, which you should read in the service provider and routes file before installing. If the endpoint sits behind only the default Nova authentication middleware, then any Nova-authenticated user can flush the cache. Add an explicit Gate or policy check in the route handler so the permission is deliberate and auditable.
- Why does the card render blank or not appear on my dashboard?
- The most common cause is the Vue 2 plus Laravel Mix build failing to mount under Nova's Vite and Vue 3 pipeline, which leaves the route working but the card invisible. This is the worst failure mode because the panel looks healthy while nothing renders. If you need the card on a current Nova version, regenerate the component with php artisan nova:card and port the logic across.
- Can I limit the cache card to local or staging environments?
- There is no built-in environment toggle, so you have to add the guard yourself. The safest approach is to conditionally register the card in NovaServiceProvider and to abort the flush route outside permitted environments in the route handler. That keeps the capability available for QA and demos without exposing it on production dashboards.
- What are the alternatives to vink/nova-cache-card?
- For clearing cache, php artisan cache:clear or a small custom Nova card gives you the same result with code you control and can audit. For visibility into cache state, Laravel Horizon, Telescope or a dedicated monitoring service will tell you far more than this card does. Given the package's age, most teams are better served by writing a small Nova card or tool themselves.
- Is vink/nova-cache-card actively maintained?
- No. It has not had a release since February 2019, has very few stars and essentially no dependents, and has no documented security response process. There will not be a CVE filed against it, so breakage would only surface when a dashboard panel goes blank for every user at once. Fork it into a namespace you own, or use it as a specification and reimplement the card on your current Nova scaffold.