Configuration Options
A list of things you can configure for the cache server
You can configure the origin URL, the port the server runs on, the cache backend to use (currently in memory and redis are supported), and a few more things.
The system takes configuration in two ways,
The
config.tomlfile in your project directoryEnvironment variables
The configuration is read from the config.toml file. You can also override the configuration using environment variables.
Origin
The endpoint to which the cache should forward requests.
Configuration Key:
originEnvironment Variable:
ORBIT_ORIGINDefault Value: None. Required
Port
The port that the cache will run on.
Configuration Key:
portEnvironment Variable:
ORBIT_PORTDefault Value:
9090
Cache Backend
The backend for caching values. Supported values are redis and in_memory. If you have cache backend configured as redis you will also need to provide Redis Host and Redis Port
Configuration Key:
cache_backendEnvironment Variable:
ORBIT_CACHE_BACKENDDefault Value:
"in_memory"
Redis Host
The host for the Redis cache backend.
Configuration Key:
redis_hostEnvironment Variable:
ORBIT_REDIS_HOSTDefault Value:
"localhost"
Redis Port
The port for the Redis cache backend.
Configuration Key:
redis_portEnvironment Variable:
ORBIT_REDIS_PORTDefault Value:
6379
Cache Header Name
The header name that returns cache status (HIT, MISS, or BYPASS).
Configuration Key:
cache_header_nameEnvironment Variable:
ORBIT_CACHE_HEADER_NAMEDefault Value:
"X-Orbit-Cache"
Cache TTL
The TTL (Time To Live) of the GraphQL cache in seconds. Default is 60 minutes.
Configuration Key:
cache_ttlEnvironment Variable:
ORBIT_CACHE_TTLDefault Value:
3600
Scope Headers
Headers used to scope the cache based on their unique values. To pass muliple headers add them as a comma separated string (example: Authorization,X-API-Key)
Configuration Key:
scope_headersEnvironment Variable:
ORBIT_SCOPE_HEADERSDefault Value:
"Authorization"
Primary Key Field
The field in GraphQL responses used to identify unique objects (this should be unique for every resource). Defaults to id.
Configuration Key:
primary_key_fieldEnvironment Variable:
ORBIT_PRIMARY_KEY_FIELDDefault Value:
"id"
Handlers GraphQL Path
The API path for GraphQL requests.
Configuration Key:
handlers_graphql_pathEnvironment Variable:
ORBIT_HANDLERS_GRAPHQL_PATHDefault Value:
"/graphql"
Handlers Flush All Path
The API path to flush all cache.
Configuration Key:
handlers_flush_all_pathEnvironment Variable:
ORBIT_HANDLERS_FLUSH_ALL_PATHDefault Value:
"/flush"
Handlers Flush By Type Path
The API path to flush cache by type.
Configuration Key:
handlers_flush_by_type_pathEnvironment Variable:
ORBIT_HANDLERS_FLUSH_BY_TYPE_PATHDefault Value:
"/flush.type"
Handlers Debug Path
The API path for debugging.
Configuration Key:
handlers_debug_pathEnvironment Variable:
ORBIT_HANDLERS_DEBUG_PATHDefault Value:
"/debug"
Handlers Health Path
The API path for health checks.
Configuration Key:
handlers_health_pathEnvironment Variable:
ORBIT_HANDLERS_HEALTH_PATHDefault Value:
"/health"
Log Level
The level of logging. Supported values are debug, info, warn, error. Defaults to info.
Configuration Key:
log_levelEnvironment Variable:
ORBIT_LOG_LEVELDefault Value:
"info"
Log Format
The format for system logs. Supported values are json and text. Defaults to text.
Configuration Key:
log_formatEnvironment Variable:
ORBIT_LOG_FORMATDefault Value:
"text"
Last updated