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, capacity : Int32 = 5, cleanInterval : Time::Span = 180.seconds, taskCount : Int32 = 0) #

[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 capacity : Int32 #

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

[View source]
def clean_expired? #

[View source]
def cleanAt : Time #

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

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

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

[View source]
def empty? #

[View source]
def expired_clean #

[View source]
def expired_clean! #

[View source]
def full? #

[View source]
def half_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 rangeCapacity : Int32 #

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

[View source]
def refresh #

[View source]
def reset #

[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]