PersistenceTime

PersistenceTime

is an option for various functions that specifies when a persistent value should be treated as expired.

Details

  • PersistenceTime can be used for PersistentValue.
  • Values can be given as relative times in seconds or relative date and time specifications.
  • Values are typically converted to absolute times based on the current time.
  • The value Infinity () can be used to specify that a persistent value should never expire.
  • An expired persistent value is treated as nonexistent, and the underlying persistent object may be removed.

Examples

open allclose all

Basic Examples  (1)

Define a persistent value that expires in 5 seconds:

In[1]:=
Click for copyable input

After 5 seconds, it is no longer used:

In[2]:=
Click for copyable input
Out[2]=
Out[2]=

Scope  (1)

Properties & Relations  (1)

See Also

Now  DateObject  PersistentValue  ExpirationDate

Introduced in 2017
(11.1)