Skip to content

Commit

Permalink
[gem] minor readme updates (skip ci)
Browse files Browse the repository at this point in the history
  • Loading branch information
0exp committed Sep 2, 2018
1 parent fe6b86a commit a7a7e8f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ Supported drivers:
##### `AnyCache` with `Redis`:

```ruby
require 'redis'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :redis
conf.redis.options = { ... } # Redis-related options
Expand All @@ -137,6 +140,9 @@ AnyCache.build
##### `AnyCache` with `Redis::Store`:

```ruby
require 'redis_store'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :redis_store
conf.redis_store.options = { ... } # Redis::Store-related options
Expand All @@ -148,6 +154,9 @@ AnyCache.build
##### `AnyCache` with `Dalli::Client`:

```ruby
require 'dalli'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :dalli
conf.dalli.servers = ... # string or array of strings
Expand All @@ -160,6 +169,9 @@ AnyCache.build
##### `AnyCache` with `ActiveSupport::Cache::RedisCacheStore`:

```ruby
require 'active_support'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :as_redis_cache_store
conf.as_redis_cache_store.options = { ... } # ActiveSupport::Cache::RedisCacheStore-related options
Expand All @@ -171,6 +183,9 @@ AnyCache.build
##### `AnyCache` with `ActiveSupport::Cache::MemCacheStore`:

```ruby
require 'active_support'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :as_mem_cache_store
conf.as_memory_store.servers = ... # string or array of strings
Expand All @@ -183,6 +198,9 @@ AnyCache.build
##### `AnyCache` with `ActiveSupport::Cache::FileStore`:

```ruby
require 'active_support'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :as_file_store
conf.as_file_store.cache_path = '/path/to/cache'
Expand All @@ -195,6 +213,9 @@ AnyCache.build
##### `AnyCache` with `ActiveSupport::Cache::MemoryStore`:

```ruby
require 'activesupport'
require 'any_cache'

AnyCache.configure do |conf|
conf.driver = :as_memory_store
conf.as_memory_store.options = { ... } # ActiveSupport::Cache::MemoryStore-related options
Expand Down Expand Up @@ -242,11 +263,11 @@ If you want to use your own cache client implementation, you should provide an o
class MyCacheClient
# ...

def read
def read(key, **)
# ...
end

def write
def write(key, value, **)
# ...
end

Expand Down
3 changes: 3 additions & 0 deletions lib/any_cache/adapters/active_support_naive_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ def exist?(key, **options)
attr_reader :expr_operation

# @return [Operation::Persist]
#
# @api private
# @since 0.1.0
attr_reader :pers_operation
end
end

0 comments on commit a7a7e8f

Please sign in to comment.