marten-redis-cache v0.1.2
Marten Redis Cache
Marten Redis Cache provides a Redis cache store that can be used with Marten web framework's cache system.
Installation
Simply add the following entry to your project's shard.yml:
dependencies:
marten_redis_cache:
github: martenframework/marten-redis-cache
And run shards install afterward.
Configuration
First, add the following requirement to your project's src/project.cr file:
require "marten_redis_cache"
Then you can configure your project to use the Redis cache store by setting the corresponding configuration option as follows:
Marten.configure do |config|
config.cache_store = MartenRedisCache::Store.new(uri: "redis:///")
end
The uri argument is optional: unless specified, the client will attempt to connect to Redis on localhost and port 6379. It should be noted that this cache store also supports all the existing initialization options in addition to the uri argument (eg. namespace, version, expires_in, etc). Please refer to the cache system documentation to learn more about Marten's caching framework.
Authors
Morgan Aubert (@ellmetha) and contributors.
License
MIT. See LICENSE for more details.
marten-redis-cache
- 6
- 0
- 0
- 0
- 4
- about 16 hours ago
- April 16, 2023
MIT License
Wed, 05 Nov 2025 13:21:25 GMT