lucky_cache
lucky_cache
Provides caching for Lucky app and particularly for html caching.
Installation
-
Add the dependency to your
shard.yml
:dependencies: lucky_cache: github: matthewmcgarvey/lucky_cache
-
Run
shards install
-
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
- Fork it (https://github.com/matthewmcgarvey/lucky_cache/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Matthew McGarvey - creator and maintainer
Repository
lucky_cache
Owner
Statistic
- 3
- 0
- 0
- 0
- 1
- almost 4 years ago
- December 25, 2020
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 21:37:06 GMT
Languages