--- title: "Retrieve data from the cache" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/cache/retrieve-data-from-cache/ description: "This page describes the method to retrieve data from the cache in your NodeJS application with sample code snippets." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "Retrieve data from the cache - API" url: /en/api/code-reference/cloud-scale/cache/get-cache-value/#GetCacheValue - name: "Cache" url: /en/cloud-scale/help/cache/introduction --- # Retrieve data from the cache > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/cache/retreive-data/) now. ### Get Cache Value [Catalyst cache](https://docs.catalyst.zoho.com/en/cloud-scale/help/cache/introduction) is divided into partitions or cache units called segments. Each segment stores cache items in the form of key-value pairs. Both keys and values are of the String type. You can retrieve the value of a cache item from a segment in the cache using the `getValue()` method. You must pass the key name as the argument. The promise returned here will be resolved to a String, which is the actual value of the key. The `segment` reference used in the code snippet below is the [segment instance](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/cache/get-segment-instance) created earlier. ```javascript //Get cache value by passing the key name let cache = app.cache(); let segment = cache.segment(); let cachePromise = segment.getValue('Age'); cachePromise.then((entity) => { console.log(entity); }); ``` ### Get Cache Object You can retrieve the details of the cache where the key-value pair is of the object type. The key object is retrieved using the _get()_ method where the key name is passed as an argument. The _segment_ reference used in the code snippet below is a [segment instance.](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/cache/get-segment-instance) The promise returned here will be resolved to an object which is a JSON. ```javascript //Get Cache object by passing the key name as argument let cache = app.cache(); let segment = cache.segment(); let cachePromise = segment.get('Age'); cachePromise.then((entity) => { console.log(entity); }); ``` A sample response that you will receive for each version is shown below: **Node JS** ``` { cache_name: "Name", cache_value: "Amelia Burrows", project_details: { project_name: "AlienCity", id: "2136000000007733" }, segment_details: { segment_name: "DataStore", id: "2136000000008572" }, expires_in: "Aug 18, 2021 06:39 PM", expiry_in_hours: "47", ttl_in_milliseconds: "172727000" } { cache_name: "Name", cache_value: "Amelia Burrows", project_details: { project_name: "AlienCity", id: 2136000000007733 }, segment_details: { segment_name: "DataStore", id: 2136000000008572 }, expires_in: "Aug 18, 2021 06:39 PM", expiry_in_hours: 47, ttl_in_milliseconds: 172609000 } ```