mirror of
https://github.com/YGGverse/YGGstate.git
synced 2025-01-26 06:24:22 +00:00
upgrade Yggverse\Cache\Memory API to v0.3.0
This commit is contained in:
parent
ce352a1091
commit
c1dc5030e6
@ -20,7 +20,7 @@ try {
|
||||
// Connect memcached
|
||||
try {
|
||||
|
||||
$memory = new Yggverse\Cache\Memory(MEMCACHED_HOST, MEMCACHED_PORT, MEMCACHED_NAMESPACE, MEMCACHED_TIMEOUT);
|
||||
$memory = new Yggverse\Cache\Memory(MEMCACHED_HOST, MEMCACHED_PORT, MEMCACHED_NAMESPACE, MEMCACHED_TIMEOUT + time());
|
||||
|
||||
} catch(Exception $e) {
|
||||
|
||||
@ -82,6 +82,7 @@ foreach ($calendar->getNodes() as $day => $node) {
|
||||
break;
|
||||
case 'traffic':
|
||||
|
||||
// @TODO improve cache timing
|
||||
$timeFrom = strtotime(sprintf('%s-%s-%s 00:00', date('Y', $requestTime), date('n', $requestTime), $day));
|
||||
$timeTo = strtotime('+1 day', strtotime(sprintf('%s-%s-%s 00:00', date('Y', $requestTime), date('n', $requestTime), $day)));
|
||||
|
||||
|
@ -20,7 +20,7 @@ try {
|
||||
// Connect memcached
|
||||
try {
|
||||
|
||||
$memory = new Yggverse\Cache\Memory(MEMCACHED_HOST, MEMCACHED_PORT, MEMCACHED_NAMESPACE, MEMCACHED_TIMEOUT);
|
||||
$memory = new Yggverse\Cache\Memory(MEMCACHED_HOST, MEMCACHED_PORT, MEMCACHED_NAMESPACE, MEMCACHED_TIMEOUT + time());
|
||||
|
||||
} catch(Exception $e) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user