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
20
votes
6 answers

How does Rails 4 Russian doll caching prevent stampedes?

I am looking to find information on how the caching mechanism in Rails 4 prevents against multiple users trying to regenerate cache keys at once, aka a cache stampede: http://en.wikipedia.org/wiki/Cache_stampede I've not been able to find out much…
Morgan Tocker
  • 3,370
  • 25
  • 36
20
votes
3 answers

Django Cache cache.set Not storing data

When I run python manage.py shell and then: from django.core.cache import cache cache.set("stack","overflow",3000) print cache.get("stack") (output: ) None I tried restarting memcache, and here is what's in my settings: CACHES = { 'default'…
Zac Connelly
  • 321
  • 1
  • 2
  • 5
20
votes
4 answers

Can you store a PHP Array in Memcache?

Can you store an Array in Memcache? I would like to store; A user ID number A user's photo URL A users name Together as an array, someone told me you could and then someone told me you couldn't Which is it?
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
20
votes
6 answers

Class 'Memcache' not found & PHP

I installed memcached by reading this article on Windows7 but unfortunately i keep getting error Fatal error: Class 'Memcache' not found in D:\xampp\htdocs\test\memcache\test.php on line 2 Line 2: $memcache = new Memcache; Win7 64, Xampp Installed.…
Mustafa
  • 825
  • 3
  • 14
  • 37
19
votes
1 answer

Getting Java Play framework to cache Ebean entities using memcached

I am running Java Play framework version v2.6.1 and using Ebean for persistence. My intention is to get bean caching going using play2-memcached plugin. What have I done so far? installed memcached on localhost and enabled verbose logging. replaced…
mindas
  • 26,463
  • 15
  • 97
  • 154
19
votes
3 answers

How does memcache store data?

I am a newbie to caching and have no idea how data is stored in caching. I have tried to read a few examples online, but everybody is providing code snippets of storing and getting data, rather than explaining how data is cached using memcache. I…
macha
  • 7,337
  • 19
  • 62
  • 84
19
votes
4 answers

PHP Fatal error: Class 'Memcached' not found in

php -v : PHP 5.5.10-1+deb.sury.org~precise+1 (cli) (built: Mar 27 2014 16:18:01) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with XCache v3.1.0, Copyright (c) 2005-2013, by mOo with…
Saurabh Chandra Patel
  • 12,712
  • 6
  • 88
  • 78
18
votes
3 answers

CakeSession::_startSession - Slow on Elasticache

We're running CakePHP 2.9, and using an Elasticache Cluster for Session Storage (which is stored via Memcached). We've disabled PHP's in-built session garbage collection as recommended…
user984976
  • 1,314
  • 1
  • 12
  • 21
18
votes
1 answer

Design/Architecture: web-socket one connection vs multiple connections

During a designing of a client/server architecture, is there any advantage to multiplexing multiple WEBSOCKET connections from the same process to the server (i.e. sharing one connection) vs opening one WEBSOCKET connection per thread/session in the…
Joseph
  • 1,716
  • 3
  • 24
  • 42
18
votes
4 answers

How to efficiently serve massive sitemaps in django

I have a site with about 150K pages in its sitemap. I'm using the sitemap index generator to make the sitemaps, but really, I need a way of caching it, because building the 150 sitemaps of 1,000 links each is brutal on my server.[1] I COULD cache…
mlissner
  • 17,359
  • 18
  • 106
  • 169
18
votes
5 answers

What's the simplest way to get a dump of all memcached keys into a file?

This is from just a single memcached server with around 20M keys (no expiry) and around 2G of data. What's the easiest way to get a dump of all the key/value pairs into a flat file? I first looked at the java net.spy.memcached.MemcachedClient, but…
jonderry
  • 23,013
  • 32
  • 104
  • 171
17
votes
2 answers

How do I view the data in memcache?

I've installed memcache and now how do I really view the data in memcache? Is there any way to see the data present in cache inside memcache? How do I really know whether memcache is getting data stored inside it? Note: I don't want to write any…
Mike
  • 7,606
  • 25
  • 65
  • 82
17
votes
3 answers

Can the time to live (TTL) for a memcached key be set to infinite?

I have implemented memcache in my PHP-MySQL based app and it gets updated regularly from a backend process. Due to this some data is conflicting with the expiration time and other backend processes, so I came up with a solution but for that I would…
Himanshu
  • 1,433
  • 4
  • 24
  • 35
17
votes
3 answers

Where's php_memcached.dll available now?

I can only find php_memcache.dll,can't find php_memcached.dll after searching for several hours...
wp2
  • 1,321
  • 3
  • 11
  • 10
17
votes
1 answer

Make an ASP.NET MVC application Web Farm Ready

What will be the most efficient way to make an ASP.NET MVC application web-farm ready. Most importantly sharing the current user's information (Context) and (not so important) cached objects such as look-up items (States, Street Types, counties…
Tawani
  • 11,067
  • 20
  • 82
  • 106