Gregg
Gregg

Reputation: 35884

Possible to Disable redis-cache plugin via config or otherwise?

I've been testing out the cache and redis-cache plugins and there is a way to disable the cache plugin with:

grails.cache.enabled=false

Unfortunately, there doesn't seem to be able to do the same for the redis-cache plugin. So when I disabled cache, the redis-cache plugin complains about a missing bean. Seems legit, but I'd really like to be able to disable all caching for local development. Suggestions?

Upvotes: 1

Views: 596

Answers (1)

cfrick
cfrick

Reputation: 37073

As of now, the killswitch in the plugin is just not implemented. See code

One option here is to disable via BuildConfig. E.g. something like:

// ...
plugins {
    if (Environment.current == Environment.DEVELOPMENT) {
        // ... conditional parts for dev
    }
    // always...
}

Upvotes: 1

Related Questions