Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement configurable storage backend #242

Merged

Conversation

viralpraxis
Copy link
Contributor

@viralpraxis viralpraxis commented Oct 13, 2023

Resolves #234

Configuration example:

# config/initializers/rails_settings_cached.rb

RailsSettings.configure do
  self.cache_storage = ActiveSupport::Cache::RedisCacheStore.new(url: "redis://localhost:6379")
end

@huacnlee
Copy link
Owner

huacnlee commented Oct 16, 2023

I'd like to accept these changes.

  1. Please write a test for customize storage.
  2. This storage must have a default storage.

@viralpraxis
Copy link
Contributor Author

Tests are fixed (hopefully)

@huacnlee huacnlee merged commit 95f538f into huacnlee:main Oct 16, 2023
9 checks passed
@viralpraxis
Copy link
Contributor Author

@huacnlee seems like you used outdated configuration API version here: ed2ab02

Current implementation assumes this kind of usage:

RailsSettings.configure do
  self.cache_storage = ActiveSupport::Cache::RedisCacheStore.new(url: "redis://localhost:6379")
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable cache storage feature
2 participants