Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martenframework/marten-memcached-cache
A Memcached cache store for the Marten web framework.
https://github.com/martenframework/marten-memcached-cache
cache crystal framework marten memcached web
Last synced: 19 days ago
JSON representation
A Memcached cache store for the Marten web framework.
- Host: GitHub
- URL: https://github.com/martenframework/marten-memcached-cache
- Owner: martenframework
- License: mit
- Created: 2023-04-15T14:16:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-11T21:32:55.000Z (6 months ago)
- Last Synced: 2024-07-12T00:15:44.116Z (6 months ago)
- Topics: cache, crystal, framework, marten, memcached, web
- Language: Crystal
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Marten Memcached Cache
[![CI](https://github.com/martenframework/marten-memcached-cache/workflows/Specs/badge.svg)](https://github.com/martenframework/marten-memcached-cache/actions)
[![CI](https://github.com/martenframework/marten-memcached-cache/workflows/QA/badge.svg)](https://github.com/martenframework/marten-memcached-cache/actions)**Marten Memcached Cache** provides a [Memcached](https://memcached.org) cache store that can be used with Marten web framework's [cache system](https://martenframework.com/docs/caching).
## Installation
Simply add the following entry to your project's `shard.yml`:
```yaml
dependencies:
marten_memcached_cache:
github: martenframework/marten-memcached-cache
```And run `shards install` afterward.
## Configuration
First, add the following requirement to your project's `src/project.cr` file:
```crystal
require "marten_memcached_cache"
```Then you can configure your project to use the Memcached cache store by setting the corresponding configuration option as follows:
```crystal
Marten.configure do |config|
config.cache_store = MartenMemcachedCache::Store.new(host: "localhost", port: 11211)
end
```The `host` and `port` arguments are optional and default respectively to `localhost` and `11211`. It should be noted that this cache store also supports all the existing initialization options in addition to these arguments (eg. `namespace`, `version`, `expires_in`, etc). Please refer to the [cache system documentation](https://martenframework.com/docs/caching) to learn more about Marten's caching framework.
## Authors
Morgan Aubert ([@ellmetha](https://github.com/ellmetha)) and
[contributors](https://github.com/martenframework/marten-memcached-cache/contributors).## License
MIT. See ``LICENSE`` for more details.