--- title: "Get segment instance" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/cache/get-segment-instance/ description: "This page describes the method to get a cache segment instance in your NodeJS application with sample code snippets." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "Cache" url: /en/cloud-scale/help/cache/introduction --- # Get a segment instance > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/cache/get-segment-instance/) now. A `segment` reference can be created using the following method which does not fire a server-side call. The ` cache` reference used in the code snippet below is the [component instance.](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/authentication/get-component-instance) When you pass the segment id in the parameter, it will refer to the particular segment. When you don't provide any segment id, it will refer to the default segment. ```javascript //Refer a cache segment through the segment ID let cache = app.cache(); let segment = cache.segment(); ```