Skip to content

## 🚀 [v1.0.17] - Caching Support and Performance Improvements#12

Merged
alexnogueirasilva merged 1 commit intomasterfrom
fix/filtrable-provider
Mar 14, 2025
Merged

## 🚀 [v1.0.17] - Caching Support and Performance Improvements#12
alexnogueirasilva merged 1 commit intomasterfrom
fix/filtrable-provider

Conversation

@alexnogueirasilva
Copy link
Member

✨ What's New

  • Added a caching layer to the Filterable trait using CacheManager, significantly improving query performance by caching filter results.
  • Cache keys are generated intelligently based on request parameters and filter criteria, reducing redundant database queries.

⚙️ Features

  • Automatic caching of filter results.
  • Configurable cache behavior (enabled/disabled, TTL, custom prefix).
  • New FilterableServiceProvider with auto-discovery for easier setup.

🔧 Improvements

  • Optimized query performance with caching layer.
  • Cleaner and more maintainable filter logic.

⚠️ Potential Impacts

  • Requires proper cache invalidation to avoid serving stale data after database updates.
  • Increased test complexity due to added caching layer.

📖 Upgrade Guide

Run the following command to publish the configuration file:

php artisan vendor:publish --tag=filterable-config

@alexnogueirasilva alexnogueirasilva self-assigned this Mar 14, 2025
@alexnogueirasilva alexnogueirasilva merged commit c106f94 into master Mar 14, 2025
@alexnogueirasilva alexnogueirasilva deleted the fix/filtrable-provider branch March 14, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant