An open API service indexing awesome lists of open source software.

https://github.com/remind101/namespaced-cache

An ActiveSupport::Cache implementation for prefixing keys automatically.
https://github.com/remind101/namespaced-cache

Last synced: about 2 months ago
JSON representation

An ActiveSupport::Cache implementation for prefixing keys automatically.

Awesome Lists containing this project

README

          

# ActiveSupport::Cache::NamespacedStore

A simple ActiveSupport::Cache implementation that wraps another implementation to prefix/namespace keys.

## Usage

```ruby
Rails.cache.write('prefix:1', 'foo')

cache = ActiveSupport::Cache::NamespacedStore.new 'prefix:', Rails.cache
cache.read '1'
# => 'foo'
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request