class Coffee::Cache

Defined in:

coffee/cache.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(storage : Array(Entry) = Array(Entry).new, taskCount : Int32 = 0, option : Option::Cache = Option::Cache.new) #

[View source]

Class Method Detail

def self.maximum_range_capacity(capacity : Int32, task_count : Int32) #

[View source]

Instance Method Detail

def <<(entry : Entry, ip_range : IPAddress) #

[View source]
def cache_hash #

[View source]
def clean_expired? #

[View source]
def cleanAt : Time #

[View source]
def cleanAt=(cleanAt : Time) #

[View source]
def clear #

[View source]
def empty? : Bool #

[View source]
def expired_clean #

[View source]
def expired_clean! #

[View source]
def full? #

[View source]
def half_full? #

[View source]
def high_priority_full? #

[View source]
def ip_range_full?(ip_range : IPAddress) : Bool #

[View source]
def mutex : Mutex #

[View source]
def mutex=(mutex : Mutex) #

[View source]
def not_expired? #

[View source]
def option : Option::Cache #

[View source]
def option=(option : Option::Cache) #

[View source]
def rangeCapacity : Int32 #

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

[View source]
def refresh_clean_at #

[View source]
def size #

[View source]
def storage : Array(Entry) #

[View source]
def storage=(storage : Array(Entry)) #

[View source]
def to_ip_address(port : Int32) : Array(Socket::IPAddress) | Nil #

[View source]
def to_ip_address : Array(Socket::IPAddress) | Nil #

[View source]
def try_write_high_priority_entry(entry : Entry, ip_range : IPAddress) #

[View source]