You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the expiresAt to an ISO string will implicitly set the ttl as unix timestamp. Now in case the I want to restore an item before it has expired, I need to set the expiresAt to an empty string in order to trigger the setter of ttl. I checked that .remove(['expiresAt']) will not trigger the setter.
Would it be possible to call the setter with an object like { expiresAt: undefined } to inform watching attributes that it was removed?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm using the following two attributes to control the TTL on an item:
Playground
Setting the
expiresAt
to an ISO string will implicitly set thettl
as unix timestamp. Now in case the I want to restore an item before it has expired, I need to set theexpiresAt
to an empty string in order to trigger the setter ofttl
. I checked that.remove(['expiresAt'])
will not trigger the setter.Would it be possible to call the setter with an object like
{ expiresAt: undefined }
to inform watching attributes that it was removed?Beta Was this translation helpful? Give feedback.
All reactions