Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hitnmiss-redis_driver

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hitnmiss-redis_driver

  • 1.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status Code Climate Test Coverage Issue Count

Hitnmiss::RedisDriver

This gem provides a Redis driver for the Hitnmiss caching library. It does this so that people can easily use Redis as a cache store when using Hitnmiss.

Installation

Add this line to your application's Gemfile:

gem 'hitnmiss-redis_driver'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hitnmiss-redis_driver

Usage

You can use this driver by simply doing the following in your Hitnmiss cache repository.

Register the driver with Hitnmiss in your application using the following.

Hitnmiss.register_driver(:redis_driver, Hitnmiss::RedisDriver.new("redis://your_redis_url"))

Then use the registered driver in your cache repository as follows.

# lib/cache_repositories/most_recent_price.rb
class MostRecentPrice
  include Hitnmiss::Repository

  driver :redis_driver
end

Thats it. Note: Registering a driver basically creates a singleton version of that driver instance. So, if you want multiple redis drivers with different configurations you will need to register multiple instances of the redis driver.

More details about how to set drivers can be found at Hitnmiss.

Contributing

If you are interested in contributing to Hitnmiss. There is a guide (both code and general help) over in CONTRIBUTING.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 03 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc