Skip to content

Instantly share code, notes, and snippets.

@mlusiak
Last active December 30, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlusiak/7902309 to your computer and use it in GitHub Desktop.
Save mlusiak/7902309 to your computer and use it in GitHub Desktop.
Saving some stuff into redis
type BitstampLast = {Id:int64; Timestamp:int; Value:decimal}
let redis = new RedisClient("localhost")
redis.FlushAll()
let redisBitstamp = redis.As<BitstampLast>()
let cp = currentPrice()
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp}
let stored = redisBitstamp.Store(last)
type BitstampLast = {mutable Id:int64; mutable Timestamp:int; mutable Value:decimal}
let redis = new RedisClient("localhost")
redis.FlushAll()
let redisBitstamp = redis.As<BitstampLast>()
let cp = currentPrice()
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp}
let stored = redisBitstamp.Store(last)
[<CLIMutable>]
type BitstampLast = {Id:int64; Timestamp:int; Value:decimal}
let redis = new RedisClient("localhost")
redis.FlushAll()
let redisBitstamp = redis.As<BitstampLast>()
let cp = currentPrice()
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp}
let stored = redisBitstamp.Store(last)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment