Skip to content

matthewmcgarvey/lucky_cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lucky_cache

Provides caching for Lucky app and particularly for html caching.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      lucky_cache:
        github: matthewmcgarvey/lucky_cache
  2. Run shards install

  3. Create a config/cache.cr and add:

LuckyCache.configure do |settings|
  settings.cache = Cache::MemoryStore(String, String).new(expires_in: 30.minutes)
end

module Lucky::HTMLBuilder
  include LuckyCache::HtmlHelpers
end

Usage

require "lucky_cache"
cache("key") do
  para "hello, world"
end

TODO

  • Use Avram::Model and queries as keys

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/matthewmcgarvey/lucky_cache/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

Caching for Lucky Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published