A simple key/value cache service with file-based persistent storage.
urlencode(base64_encode("https://example.com"))
Retrieve a cached value by its key (URL).
| Parameter | Description |
|---|---|
method | get |
l | Base64url-encoded key (must be a valid URL) |
Response:
// Value exists:
{"ok": true, "value": "cached_content", "hash": "md5_hash"}
// Value not found:
{"ok": true, "value": null, "hash": "md5_hash"}
Store a value in the cache. Write-once (existing values cannot be overwritten). Only allowed domains can be cached.
| Parameter | Description |
|---|---|
method | post |
l | Base64url-encoded key (must be a valid http/https URL from allowed domain) |
r | Base64url-encoded value (max 4096 bytes) |
Response:
// Success:
{"ok": true, "stored": true, "hash": "md5_hash", "path": "a/b/c/d/e/f/md5_hash"}
// Already exists:
{"ok": true, "stored": false, "hash": "md5_hash", "path": "a/b/c/d/e/f/md5_hash"}
// Domain refused:
{"ok": false, "error": "domain_refused", "domain": "bad.com"}
Get a list of domains that were refused in the last 7 days.
{"ok": true, "refused": ["bad.com", "spam.org"]}
This documentation page.
# Get a value (curl handles URL-encoding with --data-urlencode)
KEY="https://example.com/page"
ENCODED_KEY=$(echo -n "$KEY" | base64)
curl -G "https://www.eidjdiziflabrinkj.fr" --data-urlencode "method=get" --data-urlencode "l=$ENCODED_KEY"
# Store a value
VALUE="Hello, World!"
ENCODED_VALUE=$(echo -n "$VALUE" | base64)
curl -X POST -G "https://www.eidjdiziflabrinkj.fr" --data-urlencode "method=post" --data-urlencode "l=$ENCODED_KEY" --data-urlencode "r=$ENCODED_VALUE"
$baseUrl = 'https://www.eidjdiziflabrinkj.fr';
$key = 'https://example.com/page';
// Get a value
$params = http_build_query(['method' => 'get', 'l' => base64_encode($key)]);
$response = file_get_contents("$baseUrl?$params");
$data = json_decode($response, true);
echo $data['value'] ?? 'Not found';
// Store a value
$value = 'Hello, World!';
$params = http_build_query([
'method' => 'post',
'l' => base64_encode($key),
'r' => base64_encode($value)
]);
$ctx = stream_context_create(['http' => ['method' => 'POST']]);
$response = file_get_contents("$baseUrl?$params", false, $ctx);
const baseUrl = 'https://www.eidjdiziflabrinkj.fr';
const key = 'https://example.com/page';
// Get a value
const params = new URLSearchParams({ method: 'get', l: btoa(key) });
const response = await fetch(`${baseUrl}?${params}`);
const data = await response.json();
console.log(data.value);
// Store a value
const value = 'Hello, World!';
const postParams = new URLSearchParams({ method: 'post', l: btoa(key), r: btoa(value) });
await fetch(`${baseUrl}?${postParams}`, { method: 'POST' });
import requests
import base64
base_url = 'https://www.eidjdiziflabrinkj.fr'
key = 'https://example.com/page'
def b64(data: str) -> str:
return base64.b64encode(data.encode()).decode()
# Get a value (requests handles URL-encoding automatically)
response = requests.get(base_url, params={'method': 'get', 'l': b64(key)})
data = response.json()
print(data['value'])
# Store a value
value = 'Hello, World!'
response = requests.post(base_url, params={'method': 'post', 'l': b64(key), 'r': b64(value)})
| HTTP Code | Error | Description |
|---|---|---|
| 400 | missing_parameter_* | Required parameter missing |
| 400 | invalid_base64 | Invalid base64 encoding |
| 400 | invalid_key | Key too long or invalid UTF-8 |
| 400 | invalid_url_key | Key must be a valid http/https URL |
| 400 | empty_value | Value cannot be empty |
| 400 | value_too_long | Value exceeds max length |
| 400 | invalid_method | Unknown method parameter value |
| 403 | domain_refused | Domain not in allowlist |
| 405 | method_not_allowed | Wrong HTTP method (GET vs POST) |
| 500 | write_failed | Failed to write cache file |