1
0
mirror of https://github.com/gamaio/lobli.git synced 2024-12-22 11:42: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:
alopexc0de 2014-07-25 17:48:46 -04:00
parent adfcc57e00
commit 052a0a751c
No known key found for this signature in database
GPG Key ID: 48E847F18074C953

View File

@ -41,9 +41,11 @@
if($linkage == '1') $xTime = 604800;
if($linkage == '2') $xTime = 2628000;
$redis->setex("links:id:$short", $xTime, $link);
$redis->setex("links:title:$short", $xTime, $title);
$redis->setex("links:date:$short", $xTime, date("d/m/Y", strtotime($str)));
$redis->rpush("links:$short", $link);
$redis->rpush("links:$short", $title);
$redis->rpush("links:$short", date("d/m/Y", strtotime($str)));
$redis->expire("links:$short", $xTime);
$redis->setex("tracking:clicks:$link", $xTime, 1);
return "0$seperator$short$seperator$title";