Class: Liquid2::CachingFileSystemLoader

Inherits:
FileSystemLoader show all
Includes:
CachingLoaderMixin
Defined in:
lib/liquid2/loaders/file_system_loader.rb

Overview

A file system template loader that caches parsed templates.

Instance Method Summary collapse

Methods included from CachingLoaderMixin

#cache_key, #initialize_cache, #load

Methods inherited from FileSystemLoader

#get_source, #resolve_path

Methods inherited from TemplateLoader

#get_source, #load

Constructor Details

#initialize(search_path, default_extension: nil, auto_reload: true, namespace_key: "", capacity: 300, thread_safe: false) ⇒ CachingFileSystemLoader



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/liquid2/loaders/file_system_loader.rb', line 58

def initialize(
  search_path,
  default_extension: nil,
  auto_reload: true,
  namespace_key: "",
  capacity: 300,
  thread_safe: false
)
  super(search_path, default_extension: default_extension)

  initialize_cache(
    auto_reload: auto_reload,
    namespace_key: namespace_key,
    capacity: capacity,
    thread_safe: thread_safe
  )
end