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
17
votes
5 answers

Is the ruby operator ||= intelligent?

I have a question regarding the ||= statement in ruby and this is of particular interest to me as I'm using it to write to memcache. What I'm wondering is, does ||= check the receiver first to see if it's set before calling that setter, or is it…
brad
  • 31,987
  • 28
  • 102
  • 155
17
votes
4 answers

PHP 5.4 & Laravel Class 'Memcached' not found

I realize there are about 10 of these questions out there but none fit me completely. Steps completed: Installed memcache installed php memcache module updated laravel config to use memcache Restarted server php info…
Bill Garrison
  • 2,226
  • 3
  • 34
  • 75
17
votes
4 answers

How can I get the expire time for the particular item in memcached

In runtime, I want to retrieve the expire time info about some items in memcached. I didn't find any related interface on memcached. Can I do this? something like: mc.get_expire_time('key') Thank you
maguschen
  • 765
  • 2
  • 8
  • 12
17
votes
2 answers

How many keys are too many in memcached?

I currently have about 650,000 items in memcached (430MB memory used) and the number is still increasing. It's expected to exceed 1,000,000 items before going flat. Current hit/miss ratio is 25:1 so the efficiency is pretty good. I just wanted to…
jack
  • 17,261
  • 37
  • 100
  • 125
17
votes
1 answer

AWS ElastiCache vs RDS ReadReplica

My app currently connects to a RDS Multi-AZ database. I also have a Single-AZ Read Replica used to serve my analytics portal. Recently there have been an increasing load on my master database, and I am thinking of how to resolve this situation…
chongzixin
  • 1,951
  • 4
  • 28
  • 55
17
votes
6 answers

Whats the best way to manage keys (in memcache ) to prevent stale cached values?

Ive recently implemented memcache on my site which has been under heavy mysql load (mysql was as optimized as I could make it). It solved all my load issues, and site is running beautifully. The problem that Im facing now is stale cached values. I…
user15063
17
votes
1 answer

Store an object in memcache of GAE in Go

I want to store an object in GAE's memcache using Go. The gae documentation only shows how to store a []byte here: https://developers.google.com/appengine/docs/go/memcache/overview Of course there are general ways to serialize an object into []byte,…
Mingliang
  • 799
  • 6
  • 12
17
votes
4 answers

Failed to write session data, php and memcached

I have recently tried implementing memcached for session saving in php. I modified the session.save_handler in my php.ini and for the most part it works correctly. Sessions are saved in it. However, once in a while, I get this weird message for…
Marc
  • 464
  • 1
  • 5
  • 11
17
votes
2 answers

Memcache invalidate entries according to a pattern?

Is there a way to invalidate entries in memcache according to a wildcard key? So if I have the following memcache keys: data/1 data/2 data/3 Is there a way I can invalidate those keys with something like data/*? It would be extremely helpful to…
Kekoa
  • 27,892
  • 14
  • 72
  • 91
17
votes
1 answer

Symfony2/Memcached integration

I was following a blog post (link no longer available) and added memcached to services.yml parameters: memcached.servers: - { host: 127.0.0.1, port: 11211 } services: memcached: class: Memcached calls: - […
Leo
  • 1,016
  • 1
  • 13
  • 32
16
votes
3 answers

How do I check the content of a Django cache with Python memcached?

Tools version: Python 2.6.5 Django 1.3.1 memcached 1.4.10 python-memcached 1.48 Memcached is currently running: $ ps -ef | grep memcache nobody 2993 1 0 16:46 ? 00:00:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1 I'm…
Thierry Lam
  • 45,304
  • 42
  • 117
  • 144
16
votes
4 answers

Is it good to have Memcache, APC and Varnish on LAMP servers

I have 3 web servers I need to optimize. I currently have just a little over 2000 unique visitors a day and I want to improve performances on my servers to make sure when I will get more traffic everything will run smooth. I read (on some blogs)…
Tech4Wilco
  • 6,740
  • 5
  • 46
  • 81
16
votes
7 answers

How can I prevent RuntimeError("Unable to create a new session key.")?

A client's Django application is intermittently (about twice a day) throwing RuntimeError("Unable to create a new session key."): Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py",…
claymation
  • 2,475
  • 4
  • 27
  • 36
16
votes
2 answers

PHP session and memcacheD

Everybody knows there are two extensions for memcache on PHP: memcache memcached You can use memcache the PHP extension as a session_handler for PHP like so : session.save_handler = memcache session.save_path =…
zzarbi
  • 1,832
  • 3
  • 15
  • 29
16
votes
6 answers

Reload/Refresh cache in spring boot

I am using Spring Boot and for caching I am using Ehcache. It's working fine till now. But now I have to reload / refresh so how can I do this so that my application will not be having any downtime. I have tried many ways in Spring Ehcache…
Shubuu
  • 161
  • 1
  • 1
  • 5