module

Ralph::Query

Class methods

cache_stats

Get cache statistics

Source
clear_cache

Clear the global query cache

Source
configure_cache(max_size : Int32 = 1000, default_ttl : Time::Span = 5.minutes, enabled : Bool = true) : Nil

Configure the global query cache

Example

Ralph::Query.configure_cache(
  max_size: 2000,
  default_ttl: 10.minutes,
  enabled: true
)
Source
invalidate_table_cache(table : String) : Int32

Invalidate cache entries for a table

Source
query_cache

Global query cache instance Lazily initialized with settings from Ralph.settings

Source
query_cache=(query_cache : QueryCache)

Global query cache instance Lazily initialized with settings from Ralph.settings

Source
to_db_args(args : Array(DBValue)) : Array(DB::Any)

Convert DBValue array to DB::Any array (converts UUIDs to strings)

Source

Nested types