filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.39k stars 2.97k forks source link

feat : ignore cache control #14727

Closed MathieuMenegain closed 2 weeks ago

MathieuMenegain commented 2 weeks ago

Description

Add a parameter to bypass the cache system when running the widgets, pages, or resources methods. This can be used for a dynamic system that wants to keep the static content cached but load independent dynamic modules alongside.

Visual changes

Before : $panel->resources($resources);

After : $panel->resources($resources, ignoreCached: true);

Functional changes

danharrin commented 2 weeks ago

Hi, thanks for your contribution!

My concern here is that on applications that use Octane, the pages will remain registered between requests even if they do not apply to that request. That is a potential security issue where users could access pages registered for another user.

As such, I am not going to merge this. Generally, I only merge features that work seamlessly across environments, and many people use Octane.

However, you can use a macro on the Panel object to add your own method that can register pages dynamically in this way.

Also, please check out our contributing guide which talks about proposing the feature before submitting the PR, to ensure you aren't spending time building something that we won't merge.