Questions tagged [memcached]

Memcached is a simple distributed object cache that caches information in memory, and can be used to improve the performance of dynamic web applications by reducing access time and database load.

Memcached is open source easily deployable in-memory distributed cache, cross application and cross Platform Engine meaning the same server(s) can be accessed from a variety of languages - PHP, Java, and .NET and from Windows, Linux, etc. Memcached is currently distributed under a BSD-style open source license.

5184 questions
15
votes
4 answers

Memcached on Heroku w/ Django : can't install pylibmc / memcacheify

I've spent a lot of time on this and it's clearly beyond my newbie understanding/skills. I tried to install django-heroku-memcacheify with pip install, which throws errors. I tracked the problem down to pylibmc, which is causing all the problems.…
tiwei
  • 728
  • 10
  • 19
15
votes
5 answers

How do you work around memcached's key/value limitations?

Memcached has length limitations for keys (250?) and values (roughtly 1MB), as well as some (to my knowledge) not very well defined character restrictions for keys. What is the best way to work around those in your opinion? I use the Perl API…
mjy
  • 2,727
  • 2
  • 20
  • 22
15
votes
5 answers

Can I use Amazon Elasticache on Heroku?

I am currently using Heroku's Memcached in a Rails 3 app and would like to move over to Elasticache because the pricing is much more favorable. Is this possible? Is the configuration relatively straightforward? Is there anything that I should be…
alpheus
  • 979
  • 6
  • 15
  • 34
15
votes
3 answers

Can't connect to memcache

I am trying to connect to memcache as they suggest: $memcache = new Memcache(); $memcache->pconnect('localhost',11211); But i get: Notice: Memcache::pconnect() [memcache.pconnect]: Server localhost (tcp 11211) failed with: Connection refused (111)…
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378
14
votes
8 answers

memcached expiration time

Memcached provides a cache expiration time option, which specifies how long objects are retained in the cache. Assuming all writes are through the cache I fail to understand why one would ever want to remove an object from the cache. In other words,…
Dónal
  • 185,044
  • 174
  • 569
  • 824
14
votes
4 answers

Memcached, Redis, or Couchbase

I have a Debian server with about 16GB RAM that I'm using with nginx and several heavy mysql databases, and some custom php apps. I'd like to implement a memory cache between Mysql and PHP, but the databases are too large to store everything in…
Poe
  • 2,971
  • 6
  • 30
  • 38
14
votes
2 answers

Best practices for using memcached in Rails?

as database transcations in our app are getting more and more time consuming, we have started to use memcached to reduce the amount of queries passed to MySQL. All in all, it works fine and really saves a lot of time. But as caching was "silently…
Matt
  • 1,610
  • 2
  • 17
  • 24
14
votes
5 answers

Does setting a memcached key that already exists refresh the expiration time?

Let's say I have the following code: Memcached->set('key', 'value', 60); (expire in one minute) while (1) { sleep 1 second; data = Memcached->get('key'); // update data Memcached->set('key', data, 60); } After 60 iterations of the…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
14
votes
7 answers

How to export all keys and values from memcached with python-memcache?

I would like to export all keys and values from a memcached server, using python-memcache. There is no such function in that module. How to do it then? Perhaps something more complicated involving the "socket" module would be needed.
Falken
  • 2,528
  • 2
  • 17
  • 10
14
votes
1 answer

Evcache vs redis

I have read that netflix uses evcache , which is a wrapper over memcache and evcache proves better than memcache In general it is said that redis server as a better cache than memcache, was trying to find the comparisons of redis and evcache. Does…
Manas Saxena
  • 2,171
  • 6
  • 39
  • 58
14
votes
3 answers

how to start with memcached

Currently I am working on a project in which I need to use memcached. I have researched through a lot of web links but I do not understand how to get started with memcached. I have already worked with mongodb but would like help with configuration…
slash shogdhe
  • 3,943
  • 6
  • 27
  • 46
14
votes
4 answers

Can memcached make full use of multi-core?

Is memcached capable of making full use of multi-core? Or is there any way tuning this?
Mickey Shine
  • 12,187
  • 25
  • 96
  • 148
14
votes
2 answers

Pitfalls with local in memory cache invalidated using RabbitMQ

I have a java web server and am currently using the Guava library to handle my in-memory caching, which I use heavily. I now need to expand to multiple servers (2+) for failover and load balancing. In the process, I switched from a in-process cache…
CrazyDevMan
  • 305
  • 3
  • 11
14
votes
1 answer

Why is :memory_store cache faster than :dalli_store for memcached? Should I just stick with :memory_store?

Just starting to introduce caching into a new Rails app. We first set the cache_store to use :memory_store in the application.rb config.cache_store = :memory_store I then ran some performance tests through NewRelic to see performance before/after…
bigtunacan
  • 4,873
  • 8
  • 40
  • 73
14
votes
1 answer

Can memcached store complex objects?

Can you store complex objects including public/static variables/functions self-defined/inherited? I am talking about Memcached ( http://memcached.org/ )
Octavian
  • 4,519
  • 8
  • 28
  • 39