Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

laravel cache still show the deleted record when we delete record from database. cache is not updated it show the deleted record. #490

Pankajmaurya138 started this conversation in General
Discussion options

Issue

summarize your issue here

Environment

Laravel Version: 6.2
Laravel Model Caching Package Version: ^0.7.3
PHP Version: 7.2
Homestead Version: x.y
Operating System & Version: win 10

Stack Trace

*paste the relevant, complete stack trace here*
You must be logged in to vote

Replies: 5 comments

Comment options

laravel cache still show the deleted record when we delete record from database. cache is not updated after delete the record.

Bug

You must be logged in to vote
0 replies
Comment options

cuz the query is cached !!

try :
php artisan optimize:clear

You must be logged in to vote
0 replies
Comment options

@Pankajmaurya138 Please provide more information:

  • What is the eloquent query you are having trouble with?
  • What caching driver are you using?
  • You should clear the cache after deploying or updating: php artisan model-cache:clear
You must be logged in to vote
0 replies
Comment options

actually it happen in that case when i am using the model cache. scenario of this problem,
when i visited the specific url which have the product list page. model cache store that query in cache of product list query. when i am delete the one record from the product list then its not update the cache and still get the deleted record in the product list.
my query is that always need to call php artisan model-cache:clear after delete or update record.??

You must be logged in to vote
0 replies
Comment options

@Pankajmaurya138 Please provide the above items I listed. It's hard for me to provide help without the necessary information. Thanks :)

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Converted from issue

This discussion was converted from issue #308 on March 05, 2025 13:49.

AltStyle によって変換されたページ (->オリジナル) /