Sha256: ee2de5f00a1ba917f01df6e093a0cd14a5e261dfbfdec1332137912a7692bcd0

Contents?: true

Size: 542 Bytes

Versions: 3

Compression:

Stored size: 542 Bytes

Contents

# Frozen-string-literal: true
# Copyright: 2012 - 2016 - MIT License
# Encoding: utf-8

Jekyll::Assets::Hook.register :env, :init do
  cache = asset_config.fetch("cache", ".asset-cache")
  type  = asset_config.fetch("cache_type",
    "filesystem"
  )

  if cache != false && type != "memory"
    self.cache = begin
      Sprockets::Cache::FileStore.new(
        jekyll.in_source_dir(
          cache
        )
      )
    end

  elsif cache && type == "memory"
    self.cache = begin
      Sprockets::Cache::MemoryStore.new
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-assets-2.2.5 lib/jekyll/assets/hooks/cache.rb
jekyll-assets-2.2.4 lib/jekyll/assets/hooks/cache.rb
jekyll-assets-2.2.3 lib/jekyll/assets/hooks/cache.rb