mloughran / api_cache

Simple library which makes it easy to add caching to all your external API calls.
http://mloughran.github.com/api_cache/
MIT License
360 stars 29 forks source link

memcached ServerIsMarkedDead #24

Open cyzanfar opened 6 years ago

cyzanfar commented 6 years ago

I'm building a gem and added memcached as a dependency but then when I add it:

require "coinmarketcap/wrapper/version"
 require "coinmarketcap/wrapper/api_client"
 require "coinmarketcap/wrapper/coin"
 require "coinmarketcap/wrapper/market_data"
 require 'json'
 require 'api_cache'
 require "moneta"
 require "memcached"

 module Coinmarketcap
   module Wrapper
     BASE_API_URL = "https://api.coinmarketcap.com/v1"

     APICache.store = Moneta.new(:Memcached)
   end
 end 

and then run bin/console I get an error:

Memcached::ServerIsMarkedDead: Key {"9aaf5eb3d6edd10f12643e3087b84d21"=>"127.0.0.1:11211:8"}

is there a configuration I am missing?

saiqulhaq commented 6 years ago

that means you have to make sure that Memcached server in your machine is running

ps aux | grep memcache