Cachex v3.1.3 Cachex.Query View Source
Utility module based around creation of cache queries.
Queries are essentially just some minor convenience wrappers around the
internal match specification used by ETS. This module is exposed to make
it easier to query a cache (via Cachex.stream/3
) without having to take
care of filtering for expirations by hand.
Note that there is almost no validation in here, so test thoroughly and store compile-time versions of your queries when possible (as performance is not taken into account inside this module; it can be slow to generate).
Link to this section Summary
Functions
Creates an expiration-aware query
Creates a query to retrieve all expired records
Creates a match condition for expired records
Creates a raw query, ignoring expiration
Creates a query to retrieve all unexpired records
Creates a match condition for unexpired records
Link to this section Functions
Creates an expiration-aware query.
Creates a query to retrieve all expired records.
Creates a match condition for expired records.
Creates a raw query, ignoring expiration.
Creates a query to retrieve all unexpired records.
Creates a match condition for unexpired records.