File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/main/groovy/grails/plugin/cache/redis Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
package grails.plugin.cache.redis
2
2
3
+ import grails.core.GrailsApplication
3
4
import grails.plugins.*
4
5
import grails.plugin.cache.redis.GrailsRedisCache
5
6
import grails.plugin.cache.redis.GrailsRedisCacheManager
6
7
import grails.plugin.cache.web.filter.redis.*
7
- import org.codehaus.groovy.grails.commons.GrailsApplication
8
8
import org.slf4j.Logger
9
9
import org.slf4j.LoggerFactory
10
10
import org.springframework.data.redis.cache.DefaultRedisCachePrefix
@@ -50,12 +50,12 @@ class CacheRedisGrailsPlugin extends Plugin {
50
50
51
51
Closure doWithSpring () {
52
52
{->
53
- if (! isEnabled(application) ) {
53
+ if (! enabled ) {
54
54
log. warn ' Redis Cache plugin is disabled'
55
55
return
56
56
}
57
57
58
- def cacheConfig = application . config. grails. cache
58
+ def cacheConfig = grailsApplication . config. grails. cache
59
59
def redisCacheConfig = cacheConfig. redis
60
60
int configDatabase = redisCacheConfig. database ?: 0
61
61
boolean configUsePool = (redisCacheConfig. usePool instanceof Boolean ) ? redisCacheConfig. usePool : true
@@ -137,8 +137,8 @@ class CacheRedisGrailsPlugin extends Plugin {
137
137
}
138
138
139
139
private boolean isEnabled (GrailsApplication application ) {
140
- // TODO
141
- true
140
+ // TODO cache plugin enabled and this one is..
141
+ def enabled = application. config. grails. cache. enabled
142
+ enabled == null || enabled != false
142
143
}
143
-
144
144
}
You can’t perform that action at this time.
0 commit comments