laravel-model-caching: Inavalidation Problems since last version

I just updated to the latest version and now i have strange errors - maybe something todo with invalidation. (or not invalidating)

Example: In my SalesController i prepare to add another product to the basket. $saleItem = SaleItem::where('id','=',$request->get('id'))->first(); $product = Product::where('id',$request->get('product_id'))->first(); $saleItem->product_id = $product->id; Now sometimes - mostly when more than one product is in the basket i get this error: Property [id] does not exist on this collection instance. (Regarding the line $product->id) If i disable the cache everything is ok. Before i updated to the current version everything was fine, too.

What could be the problem over here. I have the same error on different Controllers - not only regarding products… I disabled the whole cache now - because i’m getting many errors like these…

PHP 7.1 Laravel 5.5 latest package version

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 32 (17 by maintainers)

Most upvoted comments

@mikebronner it seems to work as expected! I will have a look on the logs today - but it’s looking good at the moment!