Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filippoliverani/rails-fast-cache
Drop-in improvement for Rails cache, providing enhanced performance with asynchronous processing and better default serialization and compression
https://github.com/filippoliverani/rails-fast-cache
cache performance rails ruby
Last synced: 2 months ago
JSON representation
Drop-in improvement for Rails cache, providing enhanced performance with asynchronous processing and better default serialization and compression
- Host: GitHub
- URL: https://github.com/filippoliverani/rails-fast-cache
- Owner: filippoliverani
- License: mit
- Created: 2024-02-05T19:54:28.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-09-02T11:24:40.000Z (5 months ago)
- Last Synced: 2024-10-08T04:01:15.071Z (3 months ago)
- Topics: cache, performance, rails, ruby
- Language: Ruby
- Homepage:
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rails Fast Cache
This gem provides a wrapper around Rails cache store that improves performance by:
- using Brotli as default compressor instead of GZip
- using MessagePack as default serializer instead of Marshal
- delegating cache writes to a thread pool instead of running them synchronously## Requirements
- Rails 7.1+
- You need to provide appropriate MessagePack serializers to cache custom classes## Installation
`Gemfile`
```ruby
gem 'rails-fast-cache'
```## Configuration
Rail Fast Cache implements ActionsSupport::Cache::Store API and can be
instantiated by passing the same parameters you would pass to Rails'
`config.cache_store` configuration option.```ruby
class Application < Rails::Application
...
config.cache_store = RailsFastCache::Store.new(:memory_store, { size: 64.megabytes })
```