Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jlurena committed Jul 9, 2024
1 parent a9f1ec6 commit b9c953b
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,15 @@ gem install cached_resource

## Compatibility

CachedResource is designed to be framework agnostic, but will hook into Rails for caching and logging if available. CachedResource supports the following ActiveSupport/Rails (right) and Ruby (down) version combinations:
CachedResource is designed to be framework agnostic, but will hook into Rails for caching and logging if available. CachedResource supports the following ActiveSupport/Rails combinations.

| | πŸ›€οΈ 4.2 | πŸ›€οΈ 5.0 | πŸ›€οΈ 5.1 | πŸ›€οΈ 6.0 | πŸ›€οΈ 6.1 | πŸ›€οΈ 7.0 | πŸ›€οΈ 7.1 |
|-------|-----|-----|-----|-----|-----|-----|-----|
| πŸ’Ž 2.3 | βœ… | βœ… | βœ… | | | | |
| πŸ’Ž 2.4 | βœ… | βœ… | βœ… | | | | |
| πŸ’Ž 2.5 | βœ… | βœ… | βœ… | βœ… | βœ… | | |
| πŸ’Ž 2.6 | βœ… | βœ… | βœ… | βœ… | βœ… | |
| πŸ’Ž 2.7 | | βœ… | βœ… | βœ… | βœ… | βœ… |βœ… |
| πŸ’Ž 3.0 | | | | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.1 | | | | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.2 | | | | βœ… | βœ… | βœ… | βœ… |
| πŸ’Ž 3.3 | | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… |

## Limitations

The following are limitations for ActiveResource/Rails versions

| ActiveSupport Version | Limitation |
|---------------------- | ----------------------------------------------------------------------- |
| πŸ›€οΈ 4.X | You cannot chain calls. Ie `Thing.where(fn: 'foo').where(ln: 'bar')`. <br> However, you can still access `original_params` and the `resource_class` and replicate it with <br>`call1 = Thing.where(fn: 'foo')`<br>`call1.resource_class.where(call1.original_params.merge(ln: 'bar'))` |
| | πŸ›€οΈ 6.1 | πŸ›€οΈ 7.0 | πŸ›€οΈ 7.1 |
|----------|--------|--------|--------|
| πŸ’Ž 3.0 | βœ… | βœ… | βœ… |
| πŸ’Ž 3.1 | βœ… | βœ… | βœ… |
| πŸ’Ž 3.2 | βœ… | βœ… | βœ… |
| πŸ’Ž 3.3 | βœ… | βœ… | βœ… |

## Configuration

Expand All @@ -57,6 +45,7 @@ CachedResource accepts the following options:
* `:cache_collections` Set to false to always remake a request for collections. Default: `true`
* `:cache` The cache store that CacheResource should use. Default: The `Rails.cache` if available, or an `ActiveSupport::Cache::MemoryStore`
* `:collection_arguments` The arguments that identify the principal collection request. Default: `[:all]`
* `:cache_key_prefix` A prefix to give your cache keys. Useful for namespacing or mass deleting specific keys.
* `:collection_synchronize` Use collections to generate cache entries for individuals. Update the existing cached principal collection when retrieving subsets of the principal collection or individuals. Default: `false`
* `:concurrent_write` Set to true to make concurrent writes to cache after successful API response. Default: `false`
* Requires the [concurrent-ruby](https://rubygems.org/gems/concurrent-ruby) gem
Expand Down

0 comments on commit b9c953b

Please sign in to comment.