http_cache_handler
Version, currently master branch1 version
- master branchlatestJun 14, 2020
github.com/jwaldrip/http_cache_handler
No description declared in shard.yml.
4 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
http_cache_handler:
github: jwaldrip/http_cache_handler
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 0.34.0- License
- MIT
- Author
- Jason Waldrip
Dependencies
Runtime Dependencies
- cache*github: mamantoha/cache
README
http_cache_handler
A Handler to handle caching within Crystal's HTTP layer. Built with the Cache Shard
Installation
-
Add the dependency to your
shard.yml:dependencies: http_cache_handler: github: jwaldrip/http_cache_handler -
Run
shards install
Usage
You can use HTTPCacheHandler with any framework that accepts a Crystal
HTTP::Handler. See the guides for this on popular frameworks such as Kemal, Amber, Lucky, Orion, and Grip. See the options below for how to configure with the various strategies.
require "http_cache_handler"
# In Memory
HTTPCacheHandler.new expires_in: 30.minutes
# With a file
HTTPCacheHandler.new expires_in: 30.minutes, path: "tmp/cache"
# With Redis
redis_client = Redis::Client.new
HTTPCacheHandler.new expires_in: 30.minutes, redis: redis_client
# With MemCached
memcached_client = Memcached::Client.new
HTTPCacheHandler.new expires_in: 30.minutes, memcached: memcached_client
# Null Store (for devlopment)
HTTPCacheHandler.new expires_in: 30.minutes, null: true
Contributing
- Fork it (https://github.com/your-github-user/http_cache_handler/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
- jwaldrip - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jun 14, 2020
- Crystal
>= 0.34.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jwaldrip/http_cache_handler
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1