记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
518c1e00
Commit
518c1e00
authored
Jul 07, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~config:redis.key+prefix;
parent
614c05f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
11 deletions
+1
-11
AbstractRedisUtil.java
....liquidnet.common.cache/redis/util/AbstractRedisUtil.java
+1
-11
No files found.
liquidnet-bus-common/liquidnet-common-cache/liquidnet-common-cache-redis/src/main/java/com.liquidnet.common.cache/redis/util/AbstractRedisUtil.java
View file @
518c1e00
...
@@ -51,16 +51,12 @@ public abstract class AbstractRedisUtil {
...
@@ -51,16 +51,12 @@ public abstract class AbstractRedisUtil {
* @param time 时间(秒)
* @param time 时间(秒)
* @return
* @return
*/
*/
private
boolean
expire
(
String
key
,
long
time
)
{
public
boolean
expire
(
String
key
,
long
time
)
{
key
=
this
.
fillingKey
(
key
);
if
(
time
>
0
)
{
if
(
time
>
0
)
{
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
expire
(
key
,
time
,
TimeUnit
.
SECONDS
);
this
.
getRedisConfig
().
getRedisTemplateByDb
(
this
.
getIndex
(
key
)).
expire
(
key
,
time
,
TimeUnit
.
SECONDS
);
}
}
return
true
;
return
true
;
}
}
...
@@ -71,7 +67,6 @@ public abstract class AbstractRedisUtil {
...
@@ -71,7 +67,6 @@ public abstract class AbstractRedisUtil {
* @param key 键 不能为null
* @param key 键 不能为null
* @return 时间(秒) 返回0代表为永久有效
* @return 时间(秒) 返回0代表为永久有效
*/
*/
public
long
getExpire
(
String
key
)
{
public
long
getExpire
(
String
key
)
{
key
=
this
.
fillingKey
(
key
);
key
=
this
.
fillingKey
(
key
);
...
@@ -85,7 +80,6 @@ public abstract class AbstractRedisUtil {
...
@@ -85,7 +80,6 @@ public abstract class AbstractRedisUtil {
* @param key 键
* @param key 键
* @return true 存在 false不存在
* @return true 存在 false不存在
*/
*/
public
boolean
hasKey
(
String
key
)
{
public
boolean
hasKey
(
String
key
)
{
key
=
this
.
fillingKey
(
key
);
key
=
this
.
fillingKey
(
key
);
...
@@ -111,15 +105,11 @@ public abstract class AbstractRedisUtil {
...
@@ -111,15 +105,11 @@ public abstract class AbstractRedisUtil {
}
}
}
}
/**
/**
* 删除缓存(多db情况需要单独实现批量删除-该方法慎重使用)
* 删除缓存(多db情况需要单独实现批量删除-该方法慎重使用)
*
*
* @param key 可以传一个值 或多个
* @param key 可以传一个值 或多个
*/
*/
@SuppressWarnings
(
"unchecked"
)
public
void
del
(
String
...
key
)
{
public
void
del
(
String
...
key
)
{
if
(
key
!=
null
&&
key
.
length
>
0
)
{
if
(
key
!=
null
&&
key
.
length
>
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment