Add local weather caching mechanism

This commit is contained in:
Samer Albahra
2015-07-02 19:19:56 -05:00
parent 199399ff5e
commit 66b4d1ccbd
6 changed files with 122 additions and 24 deletions

14
models/Cache.js Normal file
View File

@@ -0,0 +1,14 @@
var mongoose = require( "mongoose" );
var cacheSchema = new mongoose.Schema( {
// Stores the current GPS location as unique for weather data cache
location: { type: String, unique: true },
// This is the end of day value for the humidity yesterday
yesterdayHumidity: Number,
currentHumidityTotal: Number,
currentHumidityCount: Number
} );
module.exports = mongoose.model( "Cache", cacheSchema );