mikebronner/laravel-model-caching

Clear cache in a record of the model.

Jesus-Rojas opened this issue · 2 comments

Hi good day, wanted to disturb @mikebronner.

Pivot::updating(function ($pivot) { $source = new Source; $source->flushCache(); });

How to clean a record of the model without to clean all model, currently it was solved with method flush but this clean all cache of model.

Thanks!!

Hi @Jesus-Rojas, that is by design, there is no other feasible way to partially clear the cache for a model.

I understand, thanks so much @mikebronner .