Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clear-cache option to the Flush command #854

Closed
wants to merge 3 commits into from
Closed

Conversation

xyluz
Copy link

@xyluz xyluz commented Aug 9, 2024

The flush command currently only removes the saved records from the database (or whatever data storage is used), it does not 'flush' records in the cache. As the name suggests, flush should remove the record from the db, and clear cache (probably more of a personal opinion - but since it's not flush-from-storage, it's just flush).

This is useful because (from my work experience), after flushing records, I always clear cache. And it'll be useful to just have that option along side the flush command. I'm not entirely sure how many people do the same, but i would personally find this useful.

Hopefully someone agrees.

it's a simple addition to the codebase, and i hope this explanation above is sufficient, otherwise, please let me know if there are any feedback/questions regarding this.

Fingers crossed

Add the option to clear cache on record flush
@driesvints driesvints closed this Aug 9, 2024
@driesvints driesvints reopened this Aug 9, 2024
@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

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.

3 participants