Skip to content

Commit

Permalink
Prepare for 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
petergoldstein committed Oct 15, 2021
1 parent 0e32aa3 commit 04d5a82
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
31 changes: 19 additions & 12 deletions History.md
@@ -1,6 +1,13 @@
Dalli Changelog
=====================

3.0.2
==========

- Restore Windows compatibility (petergoldstein)
- Add JRuby to CI and make requisite changes (petergoldstein)
- Clarify documentation for supported rubies (petergoldstein)

3.0.1
==========

Expand All @@ -11,18 +18,18 @@ Dalli Changelog
==========
- BREAKING CHANGES:

- Removes :dalli_store.
Use Rails' official :mem_cache_store instead.
https://guides.rubyonrails.org/caching_with_rails.html
- Attempting to store a larger value than allowed by memcached used to
print a warning and truncate the value. This now raises an error to
prevent silent data corruption.
- Compression now defaults to `true` for large values (greater than 4KB).
This is intended to minimize errors due to the previous note.
- Errors marshalling values now raise rather than just printing an error.
- The Rack session adapter has been refactored to remove support for thread-unsafe
configurations. You will need to include the `connection_pool` gem in
your Gemfile to ensure session operations are thread-safe.
* Removes :dalli_store.
Use Rails' official :mem_cache_store instead.
https://guides.rubyonrails.org/caching_with_rails.html
* Attempting to store a larger value than allowed by memcached used to
print a warning and truncate the value. This now raises an error to
prevent silent data corruption.
* Compression now defaults to `true` for large values (greater than 4KB).
This is intended to minimize errors due to the previous note.
* Errors marshalling values now raise rather than just printing an error.
* The Rack session adapter has been refactored to remove support for thread-unsafe
configurations. You will need to include the `connection_pool` gem in
your Gemfile to ensure session operations are thread-safe.

- Raise NetworkError when multi response gets into corrupt state (mervync, #783)
- Validate servers argument (semaperepelitsa, petergoldstein, #776)
Expand Down
19 changes: 8 additions & 11 deletions README.md
Expand Up @@ -12,19 +12,18 @@ Dalli's initial development was sponsored by [CouchBase](http://www.couchbase.co
Supported Ruby versions and implementations
------------------------------------------------

Dalli should work identically on:
As of Dalli version 3.0 the following Ruby versions are supported:

* JRuby 1.6+
* Ruby 1.9.3+
* Rubinius 2.0
* Ruby 2.5.x, 2.6.x, 2.7.x, 3.0.x
* JRuby 9.2.x, 9.3.x

If you have problems, please enter an issue.


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

Remember, Dalli **requires** memcached 1.4+. You can check the version with `memcached -h`. Please note that the memcached version that *Mac OS X Snow Leopard* ships with is 1.2.8 and it won't work. Install memcached 1.4.x using Homebrew with
Remember, Dalli **requires** memcached 1.4+. You can check the version with `memcached -h`. Please note that the memcached version that *Mac OS X Snow Leopard* ships with is 1.2.8 and it won't work. Install the most recent version of memcached using Homebrew with

brew install memcached

Expand All @@ -40,7 +39,7 @@ gem install dalli

```ruby
require 'dalli'
options = { :namespace => "app_v1", :compress => true }
options = { namespace: "app_v1", compress: true }
dc = Dalli::Client.new('localhost:11211', options)
dc.set('abc', 123)
value = dc.get('abc')
Expand All @@ -52,10 +51,10 @@ require 'dalli'
ssl_context = OpenSSL::SSL::SSLContext.new
ssl_context.ca_file = "./myCA.pem"
ssl_context.ssl_version = :SSLv23
ssl_context.verify_hostname = true
ssl_context.verify_hostname = true if ssl_context.respond_to?(:verify_hostname=)
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER

dc = Dalli::Client.new("memcached:11212", :ssl_context => ssl_context)
dc = Dalli::Client.new("memcached:11212", ssl_context: ssl_context)
dc.set("abc", 123)
value = dc.get("abc")
```
Expand All @@ -82,12 +81,10 @@ Dalli::Client accepts the following options. All times are in seconds.
**serializer**: The serializer to use for objects being stored (ex. JSON).
Default is Marshal.

**compress**: Boolean, if true Dalli will gzip-compress values larger than 1K. Default is false.
**compress**: Boolean, if true Dalli will gzip-compress values larger than compression_min_size. Default is true.

**compression_min_size**: Minimum value byte size for which to attempt compression. Default is 1K.

**compression_max_size**: Maximum value byte size for which to attempt compression. Default is unlimited.

**compressor**: The compressor to use for objects being stored.
Default is zlib, implemented under `Dalli::Compressor`.
If serving compressed data using nginx's HttpMemcachedModule, set `memcached_gzip_flag 2` and use `Dalli::GzipCompressor`
Expand Down
2 changes: 1 addition & 1 deletion lib/dalli/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Dalli
VERSION = "3.0.1"
VERSION = "3.0.2"
end
2 changes: 1 addition & 1 deletion test/memcached_mock.rb
Expand Up @@ -107,7 +107,7 @@ def memcached_ssl_persistent(port = 21397)
ssl_context = OpenSSL::SSL::SSLContext.new
ssl_context.ca_file = "/tmp/root.crt"
ssl_context.ssl_version = :SSLv23
ssl_context.verify_hostname = true if ssl_context.respond_to?(:verify_hostname)
ssl_context.verify_hostname = true if ssl_context.respond_to?(:verify_hostname=)
ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER

dc = start_and_flush_with_retry(port, "-Z -o ssl_chain_cert=/tmp/memcached.crt -o ssl_key=/tmp/memcached.key", {:ssl_context => ssl_context})
Expand Down

0 comments on commit 04d5a82

Please sign in to comment.