WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

CachePersistence

is an option for CloudObject and related cloud functions that specifies the time duration for which a response is cached by a client or on the server.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
See Also
Related Guides
History
Cite this Page

CachePersistence

is an option for CloudObject and related cloud functions that specifies the time duration for which a response is cached by a client or on the server.

Details

  • CachePersistence->t specifies that cached values should be kept for t seconds.
  • CachePersistence supports Quantity objects.
  • Possible settings for CachePersistence include:
  • Automatic cache static objects such as HTML pages or images for a short amount of time, while not caching other objects
    None do not cache the object
    t cache the object for t seconds
    Quantity[] cache the object for the specified quantity of time
  • The cloud server adds a Cache-Control header to the HTTP response based on CachePersistence , which is taken into account by web browsers to cache the response.
  • CachePersistence can be used with Delayed to specify how long to keep server-side cached versions of computations.

Examples

open all close all

Basic Examples  (3)

Export an image to cloud that will be cached in the browser for 1 day:

Check the value of the "cache-control" response header to verify the time duration for which the object will be cached by a web browser:

Deploy an expression that always evaluates on request:

Deploy an expression that is cached for up to 10 seconds:

Request the expression continuously for several seconds to confirm that the expression is only updated approximately every 10 seconds:

Scope  (1)

Deploy a delayed evaluation with a server-side cache of 5 seconds, then redeploy it with no server-side cache. The redeployment invalidates the previous server-side cache:

See Also

Delayed   UpdateInterval

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2025_cachepersistence, author="Wolfram Research", title="{CachePersistence}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/CachePersistence.html}", note=[Accessed: 16-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_cachepersistence, organization={Wolfram Research}, title={CachePersistence}, year={2015}, url={https://reference.wolfram.com/language/ref/CachePersistence.html}, note=[Accessed: 16-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /