Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
5d6cddc315b20b2aa10ae06fb8cfd46c5e07258a
1 parent
f2512779
code review by fei.hong: do format guang plusstar codes
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
yohobuy/m.yohobuy.com/application/models/Category/Class.php
yohobuy/m.yohobuy.com/application/models/Category/Class.php
View file @
5d6cddc
...
...
@@ -39,7 +39,7 @@ class ClassModel
do
{
$data
=
ClassData
::
getClassesData
();
if
(
empty
(
$data
[
'data'
]))
{
if
(
empty
(
$data
[
'data'
])
||
$data
[
'code'
]
!=
200
)
{
break
;
}
...
...
@@ -82,18 +82,18 @@ class ClassModel
$result
[]
=
$oneClass
;
}
}
while
(
false
);
if
(
USE_CACHE
)
{
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
);
}
if
(
USE_CACHE
)
{
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if
(
empty
(
$result
))
{
$result
=
Cache
::
get
(
$key
,
'slave'
);
}
}
while
(
false
);
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
);
}
}
return
$result
;
}
...
...
Please
register
or
login
to post a comment