struct

LightningImage::ImageCache

Inherits Struct < Value < Object

Constants

PATH_REGEX = /^\/(#{SUPPORTED_FORMATS.join("|")})\/(\d*)#{WIDTH_HEIGHT_SEPARATOR}(\d*)(#{FIT_SUFFIX})?\/(https?:\/\/.*)$/

Constructors

new(cache_dir : String, format : String, image_url : String, width : Int32 | Nil = nil, height : Int32 | Nil = nil, fit : Bool = false)
Source

Class methods

parse_from_path(path : String, cache_dir : String)
Source

Instance methods

content_type
Source
convert_from_source!(allow_upsize_image : Bool)
Source
etag

etag implementation in nginx: https://github.com/nginx/nginx/blob/stable-1.30/src/http/ngx_http_core_module.c#L1722-L1724

Source
exists?
Source
fetch_source!(check_content_type : Bool, timeout : Time::Span)
Source
format
Source
height
Source
image_url
Source
last_modified
Source
modification_time
Source
path
Source
source_exists?
Source
source_path
Source
width
Source

Nested types