Repository is archived
No release in over 3 years
Caching layer for forecast_io
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0

Runtime

 Project Readme

Forecast::IO::Cache

A local caching setup for Forecast.IO.

The cache is distance and timeframe sensitive, allowing cached forecasts to be returned within radius of the location requested and timeframe of cached forecast.

Thus you can make repeated calls to locations in a similar area (within radius) and get a cached forecast. Same with timeframes. This reduces the calls to the Forecast.IO API for app's that are attempting to map weather to other geo data.

When the api is called, additionally all hourly forecasts are sliced up into the cache individually to help pad the timeframe cache.

Installation

Add this line to your application's Gemfile:

gem 'forecast_io-cache'

And then execute:

$ bundle

Or install it yourself as:

$ gem install forecast_io-cache

Usage

Load the gem and then rackup the service.

use ForecastIO::Cache

or

run ForecastIO::Cache

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