Key Concepts

Before you learn more about the architecture of Catalyst cache, it’s important to familiarize yourself with some of its fundamental concepts.

Segments

Catalyst cache is divided into partitions called segments. Each segment represents a cache unit. Cache segments can be created to categorize and organize data used for similar purposes. Each cache segment can contain several cache items where the data to be cached is stored.

You can only create a cache segment from the Catalyst console. Once a segment is created, you can view or update its cache items from the console or in your application using the APIs.

Whenever a cache segment is created, a unique Segment ID is created for it automatically. You can refer to the segment using its ID. You can find the segment ID of a cache in the Cache component page from Catalyst console.

There is also a default segment in your cache that is created automatically when you create a project. If you cache data without having created a segment, or if you don’t specify the Segment ID for an operation using the SDKs or API, the default segment will be accessed.

Cache Items

A cache item is primarily a key-value pair, that contains a keyname and a corresponding value. A cache item in Catalyst contains the following attributes:

  • Keyname: The unique identifying name of the cache item.
  • Value: The value of the cache item.
  • Expiration Time: Defines the time of validity of the cache item in hours.

The default expiration time of data in a cache item is two days. Any data that crosses two days of validity will be deleted from the cache memory automatically. You can override the default expiration time of a cache item and set it to a time within two days or less.

Last Updated 2023-05-08 18:05:05 +0530 +0530

ON THIS PAGE