Closed GoogleCodeExporter closed 8 years ago
I forgot about local changes that I made to local variant of
SimpleSAML_Store_Memcache::set():
assert('is_null($expire) || is_int($expire)');
if ($expire !== NULL && $expire !== 0 && $expire < 2592000) {
$expire += time();
}
to be able to set non-zero value memcache_store.expires in config, and still to
be able to have data that do not expire (set($type, $key, $value, 0)), and also
to have relative expire times.
So changes should be made also to SimpleSAML_Store_Memcache. I'll send the
patch, just say in what way you want to handle this?
Original comment by comel...@gmail.com
on 21 Jun 2012 at 12:43
Hmmm... it looks like I made a mistake when writing the code. Both SQL and
Memcache datastore lists NULL as the value for "do not expire":
@param int|NULL $expire The expiration time (unix timestamp), or NULL if it never expires.
But SimpleSAML_Memcache::set() treats NULL as "use default expire". It does not
look like anything other than SimpleSAML_Store_Memcache calls
SimpleSAML_Memcache::set(), so changing the behaviour to that function should
be safe?
Original comment by olavmrk@gmail.com
on 26 Jun 2012 at 5:52
Hm, then memcache_store.expires would not be used anymore? IMO it would be good
to have default expire time from config setting (e.g. store.expires) when
expire = NULL, and never expires when explicitly expire = 0.
Original comment by comel...@gmail.com
on 26 Jun 2012 at 7:43
The expiration would then be up to the data. E.g. 'session.duration' for
session data.
Original comment by olavmrk@gmail.com
on 26 Jun 2012 at 8:28
OK, committed r3125. Only SimpleSAML_Store_Memcache::set() is changed,
everything else stays as is.
Original comment by comel...@gmail.com
on 26 Jun 2012 at 2:44
Original issue reported on code.google.com by
comel...@gmail.com
on 21 Jun 2012 at 9:08