Skip to content

Am I missing something obvious? #37

Closed
@mbuk

Description

@mbuk

Issue

I have a model BannedIp - it extends CachedModel
When I delete a record using
BannedIp::where('id', 1)->delete();
The cache is not updated

Using a redis for my cache

namespace App;

use GeneaLabs\LaravelModelCaching\CachedModel;

class BannedIp extends CachedModel
{

}

It appears as if

static::deleted(function () use ($instance) {
            $instance->flushCache();
        });

in CachedModel.php is never hit

I'm trying a fresh install of laravel with a single model now to see if it's something specific to my laravel env

Environment

Laravel Version: 5.5.5
Laravel Model Caching Package Version: 0.2.10
PHP Version: 7.1.10
Homestead Version: N/A
Operating System & Version: OSX High Sierra 10.13.1

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions