class CQL::Configure::CacheConfig

Overview

Cache settings, set through config.cache inside CQL.configure.

Defined in:

configure/cache_config.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def auto_cleanup : Bool #

Auto-cleanup expired items


[View source]
def auto_cleanup=(auto_cleanup : Bool) #

Auto-cleanup expired items


[View source]
def auto_cleanup? : Bool #

Check if auto-cleanup is enabled


[View source]
def auto_clear : Bool #

Auto-clear request cache after each request


[View source]
def auto_clear=(auto_clear : Bool) #

Auto-clear request cache after each request


[View source]
def batch_ops : Bool #

Enable batch operations for better performance


[View source]
def batch_ops=(batch_ops : Bool) #

Enable batch operations for better performance


[View source]
def cache_statistics : Hash(String, String | Int32 | Int64 | Float64 | Bool) #

Get comprehensive cache statistics


[View source]
def cleanup_interval : Time::Span #

How often to run cleanup


[View source]
def cleanup_interval=(cleanup_interval : Time::Span) #

How often to run cleanup


[View source]
def create_cache_interface_config : CQL::Cache::CacheConfig #

Create CacheInterface configuration object


[View source]
def create_invalidation_strategy : CQL::Cache::InvalidationStrategy #

Get invalidation strategy instance


[View source]
def fragment_tags : Bool #

Enable tagging for fragments


[View source]
def fragment_tags=(fragment_tags : Bool) #

Enable tagging for fragments


[View source]
def fragment_versions : Bool #

Enable versioning for fragments


[View source]
def fragment_versions=(fragment_versions : Bool) #

Enable versioning for fragments


[View source]
def fragments : Bool #

Enable fragment/partial caching


[View source]
def fragments=(fragments : Bool) #

Enable fragment/partial caching


[View source]
def fragments? : Bool #

Check if fragment cache is enabled


[View source]
def invalidation : String #

Invalidation strategy: "timestamp", "version", "transaction_aware"


[View source]
def invalidation=(invalidation : String) #

Invalidation strategy: "timestamp", "version", "transaction_aware"


[View source]
def key_prefix : String #

Prefix for cache keys (useful for multi-app environments)


[View source]
def key_prefix=(key_prefix : String) #

Prefix for cache keys (useful for multi-app environments)


[View source]
def log_level : Log::Severity #

Log level for cache operations


[View source]
def log_level=(log_level : Log::Severity) #

Log level for cache operations


[View source]
def logging : Bool #

Enable cache operation logging


[View source]
def logging=(logging : Bool) #

Enable cache operation logging


[View source]
def logging? : Bool #

Check if logging is enabled


[View source]
def max_age : Time::Span #

Maximum age before automatic invalidation


[View source]
def max_age=(max_age : Time::Span) #

Maximum age before automatic invalidation


[View source]
def memory : Bool #

Enable in-memory caching


[View source]
def memory=(memory : Bool) #

Enable in-memory caching


[View source]
def memory? : Bool #

Check if memory cache is enabled


[View source]
def memory_size : Int32 | Nil #

Maximum number of items in memory cache


[View source]
def memory_size=(memory_size : Int32 | Nil) #

Maximum number of items in memory cache


[View source]
def memory_stats : Bool #

Track memory cache statistics


[View source]
def memory_stats=(memory_stats : Bool) #

Track memory cache statistics


[View source]
def middleware : Bool #

Enable web framework middleware integration


[View source]
def middleware=(middleware : Bool) #

Enable web framework middleware integration


[View source]
def middleware? : Bool #

Check if middleware integration is enabled


[View source]
def name : String #

Cache instance name


[View source]
def name=(name : String) #

Cache instance name


[View source]
def on : Bool #

Main cache enable/disable switch


[View source]
def on=(on : Bool) #

Main cache enable/disable switch


[View source]
def on? : Bool #

Check if cache is enabled


[View source]
def performance_summary : String #

Performance summary for all cache systems


[View source]
def request_cache : Bool #

Enable per-request query caching (great for web apps)


[View source]
def request_cache=(request_cache : Bool) #

Enable per-request query caching (great for web apps)


[View source]
def request_cache? : Bool #

Check if request cache is enabled


[View source]
def request_id_header : String #

HTTP header for request ID


[View source]
def request_id_header=(request_id_header : String) #

HTTP header for request ID


[View source]
def request_size : Int32 #

Maximum items per request cache


[View source]
def request_size=(request_size : Int32) #

Maximum items per request cache


[View source]
def reset_cache_statistics : Nil #

Reset all cache statistics


[View source]
def setup_cache_system : Nil #

Configure the global cache system


[View source]
def stats : Bool #

Enable cache statistics collection


[View source]
def stats=(stats : Bool) #

Enable cache statistics collection


[View source]
def stats? : Bool #

Check if statistics are enabled


[View source]
def ttl : Time::Span #

Default time-to-live for cached items


[View source]
def ttl=(ttl : Time::Span) #

Default time-to-live for cached items


[View source]
def validate! : Nil #

[View source]