Jekyll Cache
Jekyll Cache provides a wrapper around ActiveSupport::Cache
that allows you to cache in Jekyll without much trouble. It defaults to .jekyll-cache
for the cache and allows you to namespace your cache directory so you do not interfere with other caches.
Usage
cache = Jekyll::Cache::FileStore.new("myCache")
cache.fetch "key" do
"val"
end
# Force Expirey
# Useful for development wrapping.
cache.fetch "key", :expires_in => 0.minutes do
"val"
end
We also provide a global cache.
Jekyll.cache.fetch "key" do
"val"
end