QueryCache

Introduced in 4.2.0

Stability: 2 - Stable

const QueryCache = require('kado/lib/QueryCache')

The Kado Query Cache system is for use with SQL based systems and will generate unique keys against queries and store them for quick reads over a chosen period.

This method of caching greatly reduces load on frequently used queries where the output does not change. Expensive display queries should always look at this as an option. The nature of this caching system is much more predictable than the built into MySQL and deprecated query_cache there.

Class: QueryCache

static QueryCache.generateKey(sql, values, options)

static QueryCache.getInstance(options)

QueryCache.constructor(options)

QueryCache.getModel()

QueryCache.read(key)

QueryCache.write(key, value, ttl)

QueryCache.execute(sql, values, options)

QueryCache.prune()

QueryCache.flush()