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 allBasic Examples (1)
Scope (2)
Define a persistent value that expires in 1 minute:
Numbers are treated as seconds:
Define a persistent value that expires in 5 days:
A persistence time of Infinity causes the value to never expire:
Properties & Relations (2)
Values specified with PersistenceTime are converted to absolute expiration dates:
The default setting for PersistenceTime is to never expire:
Text
Wolfram Research (2017), PersistenceTime, Wolfram Language function, https://reference.wolfram.com/language/ref/PersistenceTime.html.
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