Skip to content

Instantly share code, notes, and snippets.

View Qasem-h's full-sized avatar
🏠
Working from home

Qasem Hajizadeh Qasem-h

🏠
Working from home
View GitHub Profile
@Qasem-h
Qasem-h / memcache_vs_redis.md
Created October 3, 2016 23:11 — forked from psahni/memcache_vs_redis.md
Comparison of memcache and redis [ Ruby on Rails ]

##Memcache

Memcache can be used for caching data in main memory using key value pair. So it reduces database load significantly. It is actually a storage engine used by Rack::Cache which is a middleware in Rails that provides HTTP caching. For example we can store a complex query result into a key

Rails.cache.fetch(key) do
  #......Processing
end