[hibernate-dev] Redis and TTL
Guillaume Smet
guillaume.smet at gmail.com
Tue Jun 28 09:04:39 EDT 2016
I might be dumb but I can't figure out a use case where you would want an
external app to set a TTL and OGM to manipulate the same objects while
keeping the TTL originally set. It really looks weird to me.
Anyway, if it's really a use case, I think Gunnar's proposal does fit and
will allow to remove these useless pttl calls.
As for the dynamic TTL based on a property/method, let's keep it for
another day.
Mark, do you wish to make a proposal on the REFRESH/KEEP thing or should I
take it from there?
Btw, as far as I'm concerned, I would use @TTL because even if you want to
use the KEEP option, you probably would want to set a TTL if the entity
doesn't exist yet? What I would do is: if there is already a TTL for this
object, keep it, if not use the TTL defined in @TTL. But as I didn't
understand the original use case, I wouldn't bet on it :).
--
Guillaume
More information about the hibernate-dev
mailing list