Cachist API Documentation
Cachist is a global cache layer designed for applications that require distributed state synchronization with low latency. We provide sub-millisecond hot-data access with reliable persistence and powerful search capabilities across keys and JSON content.
Storage Modes
Text Mode (Raw)
When you set a value as a simple string, it is stored as **Raw Text**. This mode is optimized for ultra-fast searches on **keys and aliases only**. Searching within the content itself is not supported.
JSON Mode (Indexed)
Setting a value as a valid JSON object triggers **Automatic Indexing**. This enables full field querying directly on your values.
Authentication
All requests to the Cachist API must include your API Key in the x-api-key header. You can generate and manage your keys in the Panel.
x-api-key: your_sk_...
Core Operations
Basic key-value storage with optional aliases and TTL (Time-To-Live).
{
"key": "user:99",
"jsonValue": {
"role": "admin",
"credits": 500
},
"ttl": 3600,
"aliases": [
"session_alpha",
"admin_99"
]
}Powerful Search & Regex
NEWRegex Across Keys & Aliases
Our search engine doesn't just look at keys. It scans all **1,000+ aliases** associated with your data using high-performance regular expressions.
POWERFULBulk Regex Delete
Need to clear a namespace? Delete thousands of records instantly by matching their key patterns or logical groups (aliases) with a single call.
Regex Search Example
Search across keys and aliases using regular expressions. Use includeValues=true (default) to return the actual cached content.
{
"results": [
{
"key": "user:99",
"jsonValue": {
"role": "admin"
}
},
{
"key": "user:100",
"jsonValue": {
"role": "user"
}
}
]
}{
"results": [
{
"key": "logs:auth",
"textValue": "successful login for admin"
},
{
"key": "logs:error",
"textValue": "connection refused at :8080"
}
]
}JSON Query DSL
Advanced structured search for JSON content. Supports operators like eq, contains, gt, lt, gte, lte, and logical nesting using and / or.
{
"query": [
{
"and": [
{
"field": "role",
"operator": "eq",
"value": "admin"
},
{
"field": "credits",
"operator": "gte",
"value": 100
}
]
}
],
"includeValues": true
}Available Operators
Bulk Delete
Remove multiple keys at once matching a regex pattern.
Cleanup & TTL
Our background maintenance engine automatically invalidates and removes records from both Redis and Postgres once they expire. You don't need to worry about stale data consuming your credits.
Note: Inactive keys or keys with zero credits will be automatically suspended until credits are refilled.