Closed addgod closed 1 year ago
I think you're hitting up against the blink cache we're using to try and limit the number database queries.
If you Blink::forget("eloquent-entry-{$entry->id()}"
you should get the old entry.
But the blink cache should not have been set at this time either should it?
Eloquent driver has a blink cache that it uses to reduce the number of models and database queries. See the entry repository code.
Hmm I dont think this is the case, since even if I do a dd inside the saving listener, then if I refresh the page, then has been updated.
If i dd()
inside your listener (using the same code you provided), then the data is not saved to the database. Once I remove the dd then it works as expected.
Maybe you could take some time and make a sample repository showing your issue so it can be replicated and investigated?
The EntrySaving event is called after the entry has been persisted to the database.
So if you in your listener, try to retrieve the original Entry, it will be the new entry, not the old one.
This is what I see
Can anyone else confirm this?