Skip to content

Commit ec8bc50

Browse files
committed
Compatibility refactoring/cleanup
1 parent a2d227c commit ec8bc50

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

History.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Dalli Changelog
44
HEAD
55
=======
66

7+
- Compatibility fixes (mwynholds)
78
- Add backwards compatibility module for memcache-client, require 'dalli/memcache-client'. It makes
89
Dalli more compatible with memcache-client and prints out a warning any time you do something that
910
is no longer supported so you can fix your code.

Upgrade.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ Dalli is not meant to be 100% compatible with memcache-client, there are a few m
77
Compatibility Layer
88
----------------------
99

10+
Enable memcache-client compatibility in your application when upgrading by requiring this when
11+
initalizing your app:
12+
1013
require 'dalli/memcache-client'
1114

12-
Prints out warnings if your code is using the old memcache-client API style, explained below.
15+
This will print out warnings if your code is using the old memcache-client API style, explained below.
1316

1417

1518
Marshalling

lib/dalli.rb

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
require 'dalli/socket'
55
require 'dalli/version'
66
require 'dalli/options'
7-
require 'dalli/memcache_client_compatibility'
87

98
unless ''.respond_to?(:bytesize)
109
class String

lib/dalli/client.rb

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def self.compatibility_mode
3535
end
3636

3737
def self.compatibility_mode=(compatibility_mode)
38+
require 'dalli/compatibility'
3839
@compatibility_mode = compatibility_mode
3940
end
4041

File renamed without changes.

0 commit comments

Comments
 (0)