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 PersistentSymbol and InitializationValue.
  • 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:

After 5 seconds, it is no longer used:

Scope  (1)

Define a persistent value that expires in 1 minute:

Numbers are treated as seconds:

Define a persistent value that expires in 5 days:

Properties & Relations  (1)

Values specified with PersistenceTime are converted to absolute expiration dates:

Wolfram Research (2017), PersistenceTime, Wolfram Language function, https://reference.wolfram.com/language/ref/PersistenceTime.html.

Text

Wolfram Research (2017), PersistenceTime, Wolfram Language function, https://reference.wolfram.com/language/ref/PersistenceTime.html.

BibTeX

@misc{reference.wolfram_2021_persistencetime, author="Wolfram Research", title="{PersistenceTime}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/PersistenceTime.html}", note=[Accessed: 25-September-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_persistencetime, organization={Wolfram Research}, title={PersistenceTime}, year={2017}, url={https://reference.wolfram.com/language/ref/PersistenceTime.html}, note=[Accessed: 25-September-2021 ]}

CMS

Wolfram Language. 2017. "PersistenceTime." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PersistenceTime.html.

APA

Wolfram Language. (2017). PersistenceTime. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PersistenceTime.html