MXS-2253 Runtime ttl changes are made in seconds

Internally durations are stored in milliseconds but runtime changes
using SQL are made in seconds. Consequently, the provided value must
be multiplied by 1000 before being stored.
This commit is contained in:
Johan Wikman
2019-04-11 15:53:45 +03:00
parent 74634abc80
commit 139651c092
2 changed files with 14 additions and 10 deletions

View File

@ -1332,7 +1332,9 @@ char* CacheFilterSession::set_cache_soft_ttl(const char* zName,
if (get_uint32_value(pValue_begin, pValue_end, &value))
{
m_soft_ttl = value;
// The config value is stored in milliseconds, but runtime changes
// are made in seconds.
m_soft_ttl = value * 1000;
}
else
{
@ -1354,7 +1356,9 @@ char* CacheFilterSession::set_cache_hard_ttl(const char* zName,
if (get_uint32_value(pValue_begin, pValue_end, &value))
{
m_hard_ttl = value;
// The config value is stored in milliseconds, but runtime changes
// are made in seconds.
m_hard_ttl = value * 1000;
}
else
{