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
Plain Diff
Browse Files
Authored by
周奇琪
2016-04-30 00:38:05 +0800
Commit
6b81c0ab79c3f1e6d8c5f1fe4b19a04e872fde78
2 parents
c5f07495
2234d195
Merge branch 'master' of git.dev.yoho.cn:web/yohobuy
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
compile/m.yohobuy.com/1.3.18/readme
library/Plugin/Cache.php
yohobuy/m.yohobuy.com/application/models/Guang/Index.php
yohobuy/m.yohobuy.com/application/models/Product/List.php
yohobuy/m.yohobuy.com/application/models/Product/Search.php
compile/m.yohobuy.com/1.3.18/readme
deleted
100644 → 0
View file @
c5f0749
library/Plugin/Cache.php
View file @
6b81c0a
...
...
@@ -33,7 +33,7 @@ class Cache
* @param int $expire 缓存有效期(单位秒, 0表示永久)
* @return void
*/
public
static
function
set
(
$key
,
$value
,
$expire
=
3
6
00
)
public
static
function
set
(
$key
,
$value
,
$expire
=
300
)
{
try
{
// WINDOWS
...
...
yohobuy/m.yohobuy.com/application/models/Guang/Index.php
View file @
6b81c0a
...
...
@@ -191,7 +191,7 @@ class IndexModel
$result
=
Cache
::
get
(
$key
,
'master'
);
if
(
empty
(
$result
))
{
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
Cache
::
set
(
$key
,
$data
,
36
00
);
Cache
::
set
(
$key
,
$data
,
18
00
);
}
}
}
...
...
@@ -299,7 +299,7 @@ class IndexModel
$result
=
Cache
::
get
(
$key
,
'master'
);
if
(
empty
(
$result
))
{
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
Cache
::
set
(
$key
,
$article
,
36
00
);
Cache
::
set
(
$key
,
$article
,
18
00
);
}
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/List.php
View file @
6b81c0a
...
...
@@ -57,7 +57,7 @@ class ListModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存30
分钟
Cache
::
set
(
$key
,
$result
,
300
);
// 缓存5
分钟
}
}
...
...
@@ -140,7 +140,7 @@ class ListModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存30
分钟
Cache
::
set
(
$key
,
$result
,
300
);
// 缓存5
分钟
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Product/Search.php
View file @
6b81c0a
...
...
@@ -58,7 +58,7 @@ class SearchModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存3
0分钟
Cache
::
set
(
$key
,
$result
,
600
);
// 缓存1
0分钟
}
}
...
...
@@ -116,7 +116,7 @@ class SearchModel
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else
{
Cache
::
set
(
$key
,
$result
,
1800
);
// 缓存3
0分钟
Cache
::
set
(
$key
,
$result
,
600
);
// 缓存1
0分钟
}
}
...
...
Please
register
or
login
to post a comment