Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
Overview
Overview
Details
Activity
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
gechengyang
nouiWithSpringMVC
Commits
65981e3f
Commit
65981e3f
authored
Mar 28, 2021
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化缓存模块
parent
4a9d88d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
AbstractCache.java
...n/java/org/sss/presentation/noui/cache/AbstractCache.java
+11
-3
No files found.
src/main/java/org/sss/presentation/noui/cache/AbstractCache.java
View file @
65981e3f
...
...
@@ -30,7 +30,7 @@ public abstract class AbstractCache implements CacheController {
Object
o
=
cacheKey
.
getKey
();
String
fullSizeKey
=
generateKey
(
o
);
Integer
fullSize
=
(
Integer
)
doCacheRead
(
fullSizeKey
);
if
(
fullSize
==
null
)
if
(
fullSize
==
null
)
fullSize
=
0
;
if
(
fullSize
==
0
)
{
try
{
...
...
@@ -41,7 +41,13 @@ public abstract class AbstractCache implements CacheController {
}
}
String
valKey
=
generateValKey
(
o
,
maxSize
,
offset
);
List
lst
=
(
List
)
doCacheRead
(
valKey
);
Object
lstobj
=
doCacheRead
(
valKey
);
List
lst
=
null
;
if
(
lstobj
!=
null
&&
List
.
class
.
isAssignableFrom
(
lstobj
.
getClass
()))
{
lst
=
List
.
class
.
cast
(
lstobj
);
}
else
{
lst
=
null
;
}
if
(
lst
==
null
)
{
if
(
o
instanceof
Criteria
)
{
Criteria
criteria
=
(
Criteria
)
o
;
...
...
@@ -75,8 +81,10 @@ public abstract class AbstractCache implements CacheController {
throw
new
NoUiException
(
"["
+
this
.
cacheName
+
"]执行sql出现异常"
,
e
);
}
}
if
(
lst
!=
null
)
{
doCacheWrite
(
valKey
,
lst
,
keepAlive
);
}
}
return
new
CacheList
(
lst
,
fullSize
);
}
...
...
@@ -86,7 +94,7 @@ public abstract class AbstractCache implements CacheController {
sb
.
append
(
SPLIT
.
intern
());
sb
.
append
(
maxSize
);
}
if
(
offset
>
0
)
{
if
(
offset
>
=
0
)
{
sb
.
append
(
SPLIT
.
intern
());
sb
.
append
(
offset
);
}
...
...
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