Sha256: f16676026b5d320d53e8dc605a463289e77e7cd75d98b2ec256e081218bb6c80

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

Legion::Cache
=====

Legion::Cache is a wrapper class to handle requests to the caching tier. It supports both memcached and redis

Supported Ruby versions and implementations
------------------------------------------------

Legion::Json should work identically on:

* JRuby 9.2+
* Ruby 2.4+


Installation and Usage
------------------------

You can verify your installation using this piece of code:

```bash
gem install legion-cache
```

```ruby
require 'legion/cache'

Legion::Cache.setup
Legion::Cache.connected? # => true
Legion::Cache.set('foobar', 'testing', ttl: 10)
Legion::Cache.get('foobar') # => 'testing'
sleep(11)
Legion::Cache.get('foobar') # => nil

```

Settings
----------

```json
{
  "driver": "dalli",
  "servers": [
    "127.0.0.1:11211"
  ],
  "connected": false,
  "enabled": true,
  "namespace": "legion",
  "compress": false,
  "cache_nils": false,
  "pool_size": 10,
  "timeout": 10,
  "expires_in": 0
}
```

Authors
----------

* [Matthew Iverson](https://github.com/Esity) - current maintainer

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legion-cache-1.2.0 README.md