mirror of
https://github.com/gamaio/lobli.git
synced 2024-12-22 19:52:40 +00:00
Put link data into a list instead of storing seperate values for everything.
This is silly to store everything seperatly when I can just query and get an array for everything that I need.
This commit is contained in:
parent
adfcc57e00
commit
052a0a751c
@ -41,9 +41,11 @@
|
|||||||
if($linkage == '1') $xTime = 604800;
|
if($linkage == '1') $xTime = 604800;
|
||||||
if($linkage == '2') $xTime = 2628000;
|
if($linkage == '2') $xTime = 2628000;
|
||||||
|
|
||||||
$redis->setex("links:id:$short", $xTime, $link);
|
$redis->rpush("links:$short", $link);
|
||||||
$redis->setex("links:title:$short", $xTime, $title);
|
$redis->rpush("links:$short", $title);
|
||||||
$redis->setex("links:date:$short", $xTime, date("d/m/Y", strtotime($str)));
|
$redis->rpush("links:$short", date("d/m/Y", strtotime($str)));
|
||||||
|
$redis->expire("links:$short", $xTime);
|
||||||
|
|
||||||
$redis->setex("tracking:clicks:$link", $xTime, 1);
|
$redis->setex("tracking:clicks:$link", $xTime, 1);
|
||||||
|
|
||||||
return "0$seperator$short$seperator$title";
|
return "0$seperator$short$seperator$title";
|
||||||
|
Loading…
Reference in New Issue
Block a user