TIP 39 / 100

Forget Cache on Save.

If you have cache key like posts that gives collection, and you want to forget that cache key on new store or update, you can call static saved function on your model:

code
class Post extends Model
{
    // Clear the cache key when the record is stored or updated.
    public static function boot()
    {
        parent::boot();
        static::saved(function () {
           Cache::forget('posts');
        });
    }
}