Response Caching

hyperglass uses Redis for cache storage. Every query is cached and automatically expired from the cache after a configurable timeout period.

Common Redis parameters are configurable, in case you already have a dedicated Redis server you'd prefer to use, instead of running it on the same server as hyperglass:

ParameterTypeDefaultDescription
hostString'localhost'Redis server IP address or hostname.
portInteger6379Redis server TCP port.
databaseInteger1Database ID for hyperglass.
passwordStringNonePassword for Redis password authentication.
timeoutInteger120Time in seconds query output will be kept in the Redis cache.
show_textBooleantrueShow the cache message in the hyperglass UI.
Caching

hyperglass caches every query response to a Redis database, and always responds to a request with the cached value. If hyperglass receives a query for which it has no matching cached entry, the query parameters are used to created a new cache entry, hyperglass executes the request normally, writes the response to the cache, and then returns the response to the end user.

Example

hyperglass.yaml
cache:
database: 0
host: localhost
port: 6379
show_text: true
timeout: 120