Skip to content

Commit 17afab8

Browse files
authored
Remove outdated reference to old rails versions and lack of JRuby support (#514)
The mention of behaviour for "some versions of rails" is referring to versions of rails that are no longer supported, so is irrelevant. JRuby should work now that Dalli support has been added, since it is a pure ruby client.
1 parent 422e176 commit 17afab8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,13 @@ Cache keys include a version number by default, specified in `IdentityCache::CAC
254254

255255
## Caveats
256256

257-
A word of warning. Some versions of rails will silently rescue all exceptions in `after_commit` hooks. If an `after_commit` fails before the cache expiry `after_commit` the cache will not be expired and you will be left with stale data.
257+
A word of warning. If an `after_commit` fails before the cache expiry `after_commit` the cache will not be expired and you will be left with stale data.
258258

259259
Since everything is being marshalled and unmarshalled from Memcached changing Ruby or Rails versions could mean your objects cannot be unmarshalled from Memcached. There are a number of ways to get around this such as namespacing keys when you upgrade or rescuing marshal load errors and treating it as a cache miss. Just something to be aware of if you are using IdentityCache and upgrade Ruby or Rails.
260260

261261
IdentityCache is also very much _opt-in_ by deliberate design. This means IdentityCache does not mess with the way normal Rails associations work, and including it in a model won't change any clients of that model until you switch them to use `fetch` instead of `find`. This is because there is no way IdentityCache is ever going to be 100% consistent. Processes die, exceptions happen, and network blips occur, which means there is a chance that some database transaction might commit but the corresponding memcached cache invalidation operation does not make it. This means that you need to think carefully about when you use `fetch` and when you use `find`. For example, at Shopify, we never use any `fetch`ers on the path which moves money around, because IdentityCache could simply be wrong, and we want to charge people the right amount of money. We do however use the fetchers on performance critical paths where absolute correctness isn't the most important thing, and this is what IdentityCache is intended for.
262262

263263
## Notes
264264

265-
- JRuby will not work with this current version, as we are using the memcached gem internally to interface with memcache.
266265
- See CHANGELOG.md for a list of changes to the library over time.
267266
- The library is MIT licensed and we welcome contributions. See CONTRIBUTING.md for more information.

0 commit comments

Comments
 (0)