Introduction
  • 29 Oct 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Introduction

  • Dark
    Light
  • PDF

Article Summary

Description

The cache object provides a way for your scripts to store information while your app is running.


Properties

Below is a list of properties supported by this object.

NameDescriptionUWPWebAvatars
countReturns the total # of items in cacheYesYesYes

Functions

Below is a list of functions supported by this object.

NameDescriptionUWPWebAvatars
setInserts an item into cacheYesYesYes
getReturns an item from cache (null if doesn't exist)YesYesYes
removeRemoves one or more items from cacheYesYesYes
clearClears all items from cacheYesYesYes
existsReturns whether or not an item currently exists in cacheYesYesYes

Remarks

The cache object is useful when you need to store information between multiple script executions.

Recall, your scripts will run when a supported action (event) occurs. After your script completes, it will not run again until another supported action occurs. If you want to store information from one execution and retrieve it on subsequent executions, this object provides a way for you to do so.


What's Next