Skip to content

Commit

Permalink
加入jetcache缓存,提高权限判断的性能
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoutaoo committed Nov 8, 2019
1 parent 584c024 commit 9115c8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 73,7 @@ public ConfigAttribute findConfigAttributesByUrl(HttpServletRequest authRequest)
}

@Override
@Cached(name = "resource4user::", key = "#username", cacheType = CacheType.BOTH)
@Cached(name = "resource4user::", key = "#username", cacheType = CacheType.LOCAL)
public Set<Resource> queryByUsername(String username) {
return resourceProvider.resources(username).getData();
}
Expand Down
14 changes: 0 additions & 14 deletions auth/authentication-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 46,6 @@ jetcache:
keyConvertor: fastjson
expireAfterWriteInMillis: 60000
expireAfterAccessInMillis: 40000
remote:
# 默认2分钟的远程缓存
default:
type: redis
expireAfterWriteInMillis: 120000
keyConvertor: fastjson
valueEncoder: kryo
valueDecoder: kryo
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}

logging:
level:
Expand Down

0 comments on commit 9115c8c

Please sign in to comment.