Cache organizes temporary data using Segments and Cache Entries.
Segment
A Segment groups related cache entries together.
Example:
HR -- EmployeeToken, ManagerID
Marketing -- CampaignToken, Region
Finance -- ApprovalToken
Cache Entry
A cache entry stores a single key-value pair inside a segment.
Each cache entry contains: Key, Value, Expiration Time (TTL)
When the TTL expires, the cache entry is automatically deleted.
The first segment and the first cache entry are created together.
A unique link for the segment is generated automatically and displayed at the top of the page.
After the first segment is created, the New Segment button becomes available at the top right of the Cache page.
Click New Segment.
Enter the following details:
Name: Name of the segment.
Description: Description of the segment.
Click Create.
After one or more segments are available, you can create additional cache entries under any segment.
To create additional cache entries under a segment:
Select a segment from the left pane.
Click New Cache.
The selected segment is automatically populated.
Enter the cache details.
Click Create.
Item | Limit |
Maximum segments per organization | 50 |
Maximum storage per segment | 5 MB |
Maximum total cache storage | 250 MB |
Maximum key length | 50 characters |
Maximum value size | 16 KB |
Minimum TTL | 1 minute |
Maximum TTL | 48 hours |
You can update or delete cache entries within a segment.
Select the required segment from the Segment List.
Click the required cache entry.
Update: Modify the Value or Expiration Time (TTL) and click Save.
Delete: Click the Delete icon in the top-right corner and confirm the deletion.
Cache is primarily intended for use within server-side scripts.
Functions, Server Scripts, and other supported SDK-based components can create, retrieve, update, and delete cache entries programmatically.
Use the Cache SDK to create, retrieve, update, and delete cache entries from server-side scripts.
Example:
Operation | SDK | Description |
Create | QntrlCache.create(seg_id, key, value, duration) | Creates a new cache entry in the specified segment. |
Retrieve | QntrlCache.of(seg_id, key) | Retrieves the value of an existing cache entry. |
Update | QntrlCache.update(seg_id, key, value, duration) | Updates the value and expiration time of an existing cache entry. |
Delete | QntrlCache.delete(seg_id, key) | Deletes the specified cache entry from the segment. |
Example:
QntrlCache.create(segmentId, key, value, duration);
When executed:
A new cache entry is created if the key does not exist.
If the key already exists within the selected segment, the existing value is updated.
The cache entry becomes immediately available in the Cache module until its configured TTL expires.