Cache Management
The Performance Optimization panel in WhatsMark allows administrators to manage cached data that builds up over time. Caching improves speed and reduces server load, but outdated or corrupted cache can lead to issues. This panel provides tools to clear specific caches for performance, troubleshooting, and accurate data rendering.
Tenant Cache Status Overview
Before clearing cache, WhatsMark provides key insights about the current cache state:
Field | Description |
---|---|
Cache Driver | Backend used for storing cached data (e.g., file , redis ). |
Total Size | Total size of all cached data. |
Hit Rate | Percentage of successful cache reads (98.68% indicates high efficiency). |
Last Cleared | When the cache was last manually cleared. |
Total Keys | Total number of items stored in cache. |
Cache Tags | Whether tag-based cache invalidation is supported (✅ Supported ). |
Cache Health | Overall status (Excellent , Good , etc.). |
ℹ️ Each tenant's cache is isolated — operations affect only the current tenant and not others or the global admin cache.
Cache Management Tools
You can selectively clear the following cache types by clicking Run Tool for each one. Here's a breakdown of each option:
Clear Framework Cache
- What it does: Clears Laravel's internal cache, including application configuration, service providers, and more.
- When to use: After code changes or package updates.
- Benefits: Ensures the application reflects the latest logic and settings.
Clear Bootstrap Cache
- What it does: Removes compiled PHP class files stored in
bootstrap/cache/
. - When to use: After Laravel upgrades or changes in service container bindings.
- Benefits: Avoids conflicts with outdated precompiled classes.
Clear Temporary Files
- What it does: Deletes all temporary cache files stored by the system to improve performance and storage.
- When to use: During routine maintenance or if storage usage grows unexpectedly.
- Benefits: Frees up disk space and removes unused temporary data.
Clear Compiled Views
- What it does: Clears Blade view caches to force recompilation of UI templates.
- When to use: After modifying
.blade.php
or theme files. - Benefits: Displays the most recent interface updates to users.
Clear Config Cache
- What it does: Regenerates the configuration cache from the
/config
directory. - When to use: After changing
.env
values or editing config files. - Benefits: Ensures the application uses up-to-date configuration values.
Clear Route Cache
- What it does: Clears and regenerates route definitions.
- When to use: After adding, removing, or modifying routes in
web.php
orapi.php
. - Benefits: Ensures proper routing behavior across modules and endpoints.
Clear System Log Files
- What it does: Deletes old logs generated by the system.
- When to use: During performance optimization, cleanup, or to free up disk space.
- Benefits: Prevents excessive storage usage and improves disk I/O performance.
Enable WhatsApp Log
- What it does: Enables or disables logging specific to WhatsApp API events.
- When to use: When debugging WhatsApp integrations or tracking delivery/report data.
- Mode:
false
(off) by default.
How to Use These Tools
Navigate to: System Settings → Cache Management
Review your Tenant Cache Status panel for overall system metrics.
Under the tool list, click the Run Tool button next to the cache type you want to clear.
WhatsMark will execute the action and display a confirmation or status message.
⚠️ Caution: Avoid clearing config or route caches in production during peak usage unless necessary, as this may cause temporary application errors or delays.
Best Practices for Cache Management
- ✅ Run Clear Config Cache after any
.env
or config file change in production. - ✅ Use Clear Compiled Views when pushing frontend changes to ensure users see the latest UI.
- ✅ Regularly Clear System Logs if logs are not auto-rotated.
- ✅ Avoid using all tools simultaneously unless performing a full system reset or deep clean.
By keeping cache clean and up to date, you ensure WhatsMark remains responsive, efficient, and secure — even at scale.