--- title: "set" slug: "cache-set" updated: 2026-02-04T21:29:56Z published: 2026-02-04T21:29:56Z canonical: "docs.doc-know.com/cache-set" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.doc-know.com/llms.txt > Use this file to discover all available pages before exploring further. # set ### cache.set Inserts an object into cache, persisting for the lifetime of your app or until cleared. ### Input Parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | **key** | Text | Yes | Unique object identifier | | **value** | Any | Yes | Object to store | ### Returns No return value. ### Examples ``` // store numeric value in cache cache.set("score", 64); ``` ``` // prepare a custom person object var person = { "firstName": "Caleb", "age": 25, "id": system.newId() }; // store person object in cache cache.set("myPerson", person); ``` ``` // later, we can get same person from cache var person = cache.get("myPerson"); // print person's first name to the debug console debug.log(person.firstName); ``` ### Remarks Use this function when you want to store information across script executions. Definition **Cache** is a programming term referring to a simple database of information. A cache is a collection of associated **key-value pairs**. The **key** must be a unique identifier and the **value** is any object you want to store. Once stored, you can retrieve these objects using their keys.