Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a3b5b54c
authored
Jun 04, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
缓存问题
parent
160b215c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
app/Model/IntracodeModel.php
app/Model/IntracodeModel.php
View file @
a3b5b54c
...
...
@@ -38,7 +38,7 @@ class IntracodeModel extends Model
public
function
getAllEncode
()
{
$redis
=
new
RedisModel
();
$codeList
=
json_decode
(
$redis
->
get
(
'EncodedList_supplier'
),
true
);
$codeList
=
json_decode
(
$redis
->
get
(
'EncodedList_
all_
supplier'
),
true
);
if
(
!
$codeList
)
{
$codeList
=
$this
->
where
(
'admin_id'
,
'>'
,
0
)
->
join
(
'user_info'
,
'lie_intracode.admin_id'
,
'='
,
'user_info.userId'
)
->
select
(
'code_id'
,
'admin_id'
,
'name'
,
'email'
)
->
get
();
...
...
@@ -49,8 +49,8 @@ class IntracodeModel extends Model
$v
[
'name'
]
=
$v
[
'email'
];
}
}
$redis
->
set
(
'EncodedList_supplier'
,
json_encode
(
$codeList
));
$redis
->
expire
(
'EncodedList_supplier'
,
60
*
10
);
//缓存10分钟
$redis
->
set
(
'EncodedList_
all_
supplier'
,
json_encode
(
$codeList
));
$redis
->
expire
(
'EncodedList_
all_
supplier'
,
60
*
10
);
//缓存10分钟
}
}
return
$codeList
;
...
...
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