Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
76d46e6e30b323a7ec2d8fc15c26b1e80c41571e
2 parents
af725b0b
158dcda7
Merge branch 'hotfix/isIncrementInt' into develop/wap
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
library/Plugin/Cache.php
library/Plugin/Cache.php
View file @
76d46e6
...
...
@@ -75,7 +75,7 @@ class Cache
// 当接口异常,一级缓存没取到数据的情况
if
(
$node
===
'slave'
)
{
$incrementKey
=
self
::
makeKey
(
'_increment_'
.
$key
,
'slave'
);
$incrementValue
=
HoodCache
::
Memcached
(
'slave'
)
->
get
(
$incrementKey
);
$incrementValue
=
intval
(
HoodCache
::
Memcached
(
'slave'
)
->
get
(
$incrementKey
)
);
// 接口调用失败累计5次之后,回填二级缓存数据到一级缓存, 重置计数值为0
if
(
is_int
(
$incrementValue
)
&&
$incrementValue
>
5
)
{
HoodCache
::
Memcached
(
'master'
)
->
set
(
self
::
makeKey
(
$key
,
'master'
),
$result
,
300
);
...
...
Please
register
or
login
to post a comment